-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExampleGame.cs
34 lines (30 loc) · 1.47 KB
/
ExampleGame.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using NetAF.Assets;
using NetAF.Assets.Characters;
using NetAF.Assets.Locations;
using NetAF.Logic;
using NetAF.Logic.Callbacks;
using NetAF.Utilities;
namespace NetAF.Blazor.Example
{
internal class ExampleGame
{
internal static GameCreator Create(GameConfiguration configuration)
{
PlayableCharacter player = new("Dave", "A young boy on a quest to find the meaning of life.");
RegionMaker regionMaker = new("Mountain", "An imposing volcano just East of town.")
{
[1, 0, 0] = new("Cavern", "A dark cavern set in to the base of the mountain.", [new Exit(Direction.North)], [new Item("Torch", "A wooden torch", true)]),
[1, 1, 0] = new("Outside", "Outside the dark cavern.", [new Exit(Direction.South), new Exit(Direction.East), new Exit(Direction.West)]),
[0, 1, 0] = new("Ledge", "A ledge, overlooking the town.", [new Exit(Direction.East)]),
[2, 1, 0] = new("Field", "A field.", [new Exit(Direction.West)])
};
OverworldMaker overworldMaker = new("Dave's World", "An ancient kingdom.", regionMaker);
return Game.Create(
new("The Life of Dave", "A very low budget adventure.", "Ben Pollard"),
"Dave awakes to find himself in a cavern...",
AssetGenerator.Retained(overworldMaker.Make(), player),
GameEndConditions.NoEnd,
configuration);
}
}
}