View Source DevJoy.Scene.Element.Challenge (DevJoy v1.0.0)

Challenge is a polimorfic custom content specific for your game. It could be a mini-game or other custom action user have complete to progress in game.

Example

defmodule MyApp.SceneWithChallenge do
  use DevJoy.Scene

  part :challenge do
    challenge :challenge_type, some: :data
  end
end

Summary

Types

Additional data

t()

Challenge struct

Type used to identify challenge

Types

@type data() :: Keyword.t()

Additional data

@type t() :: %DevJoy.Scene.Element.Challenge{data: data(), type: type()}

Challenge struct

@type type() :: atom()

Type used to identify challenge