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

17 lines
376 B
Elixir
Raw Normal View History

2024-08-17 19:43:08 +02:00
defmodule Example.Game do
require Logger
2024-08-17 19:43:08 +02:00
use Amethyst.API.Game, meta: [default: true]
@impl true
2024-08-25 13:17:25 +02:00
def instantiate(supervisor) do
Logger.info("The supervisor for this game is at #{inspect(supervisor)}")
{:ok, %{}}
2024-08-17 19:43:08 +02:00
end
@impl true
2024-08-25 13:17:25 +02:00
def login(from, cfg, _state) do
2024-08-19 00:00:03 +02:00
Logger.info("Player logged in from #{inspect(from)}: #{inspect(cfg)}")
2024-08-25 13:17:25 +02:00
:ok
end
2024-08-17 19:43:08 +02:00
end