amethyst/apps/example_game/lib/example/game.ex
Kodi Craft dc9a2f2b5f
Some checks failed
Build & Test / nix-build (push) Failing after 27s
Some changes to how games are created
2024-08-25 13:17:25 +02:00

17 lines
376 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, _state) do
Logger.info("Player logged in from #{inspect(from)}: #{inspect(cfg)}")
:ok
end
end