amethyst/apps/example_game/lib/example/game.ex

18 lines
437 B
Elixir

defmodule Example.Game do
require Logger
use Amethyst.API.Game, meta: [default: true]
@impl true
def instantiate(supervisor) do
Logger.info("The supervisor for this game is at #{inspect(supervisor)}")
{:ok, %{}}
end
@impl true
def login(from, cfg, refs) do
Logger.info("Player logged in from #{inspect(from)}: #{inspect(cfg)}")
Logger.info("The refs for this game are #{inspect(refs)}")
:ok
end
end