2024-08-17 19:43:08 +02:00
|
|
|
defmodule Example.Game do
|
2024-08-18 13:44:09 +02:00
|
|
|
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
|
2024-08-18 13:44:09 +02:00
|
|
|
|
|
|
|
@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)}")
|
2024-08-18 13:44:09 +02:00
|
|
|
{:ok, state}
|
|
|
|
end
|
2024-08-17 19:43:08 +02:00
|
|
|
end
|