Move files and folders to new repo format to enable multi-project format
This commit is contained in:
35
Zennysoft.Game.Ma/src/map/dungeon/code/Floor0.cs
Normal file
35
Zennysoft.Game.Ma/src/map/dungeon/code/Floor0.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class Floor0 : Node3D, IDungeonFloor
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency] protected IGame Game => this.DependOn<IGame>();
|
||||
|
||||
[Node] private Area3D Exit { get; set; } = default!;
|
||||
|
||||
[Node] private Marker3D PlayerSpawnPoint { get; set; } = default!;
|
||||
|
||||
public ImmutableList<IDungeonRoom> Rooms => [];
|
||||
|
||||
public bool FloorIsLoaded { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Show();
|
||||
Exit.AreaEntered += Exit_AreaEntered;
|
||||
FloorIsLoaded = true;
|
||||
}
|
||||
|
||||
private void Exit_AreaEntered(Area3D area) => ExitReached();
|
||||
|
||||
public void ExitReached() => Game.FloorExitReached();
|
||||
public void InitializeDungeon() { return; }
|
||||
public Transform3D GetPlayerSpawnPoint() { return new Transform3D(PlayerSpawnPoint.Basis, new Vector3(PlayerSpawnPoint.GlobalPosition.X, -3, PlayerSpawnPoint.GlobalPosition.Z)); }
|
||||
}
|
||||
Reference in New Issue
Block a user