Add door interaction system with state management and event publishing
This commit is contained in:
25
GameCore/Interaction/DoorComponent.cs
Normal file
25
GameCore/Interaction/DoorComponent.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using GameCore.ECS.Interfaces;
|
||||
using GameCore.Interaction.Interfaces;
|
||||
|
||||
namespace GameCore.Interaction;
|
||||
|
||||
public class DoorComponent : IComponent
|
||||
{
|
||||
public enum DoorState
|
||||
{
|
||||
Locked,
|
||||
Closed,
|
||||
Opening,
|
||||
Open,
|
||||
Closing
|
||||
}
|
||||
|
||||
public DoorState CurrentState { get; set; } = DoorState.Locked;
|
||||
public List<IInteractionRequirement> Requirements { get; set; } = [];
|
||||
|
||||
public bool IsOneTimeUnlock { get; set; } = false;
|
||||
|
||||
public float OpenSpeed { get; set; } = 2.0f;
|
||||
public float OpenProgress { get; set; } = 0.0f;
|
||||
public float Timer { get; set; } = 0.0f;
|
||||
}
|
||||
Reference in New Issue
Block a user