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

16 lines
302 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
def instantiate() do
{:ok, [:hello]}
end
@impl true
def login(from, cfg, state) do
2024-08-19 00:00:03 +02:00
Logger.info("Player logged in from #{inspect(from)}: #{inspect(cfg)}")
{:ok, state}
end
2024-08-17 19:43:08 +02:00
end