diff --git a/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs b/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs new file mode 100644 index 0000000..bb22880 --- /dev/null +++ b/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs @@ -0,0 +1,21 @@ +namespace MedievalParty.Core.Game +{ + public class GameManager_RollInitiativeState: IState + { + + public void OnEnter() + { + throw new System.NotImplementedException(); + } + + public void OnExit() + { + throw new System.NotImplementedException(); + } + + public void OnUpdate() + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs.meta b/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs.meta new file mode 100644 index 0000000..6ad4cb2 --- /dev/null +++ b/Assets/Scripts/Core/Game/GameManager_RollInitiativeState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 43bf2b39ebe04f61837d8f3d594d3bbe +timeCreated: 1764264245 \ No newline at end of file diff --git a/Assets/Scripts/Core/GameManager.cs b/Assets/Scripts/Core/GameManager.cs index 7d988d2..e788155 100644 --- a/Assets/Scripts/Core/GameManager.cs +++ b/Assets/Scripts/Core/GameManager.cs @@ -13,6 +13,8 @@ namespace MedievalParty.Core { public static GameManager Instance { get; private set; } + public event EventHandler onRollInitiative; + [Header("Spawn")] [SerializeField] private PlayerObject playerPrefab; [SerializeField] private AIObject aiPrefab; diff --git a/Assets/Scripts/Entity/EntityObject.cs b/Assets/Scripts/Entity/EntityObject.cs index 9f107fb..69a41b9 100644 --- a/Assets/Scripts/Entity/EntityObject.cs +++ b/Assets/Scripts/Entity/EntityObject.cs @@ -1,12 +1,17 @@ -using UnityEngine; +using System; +using UnityEngine; namespace MedievalParty.Entity { public abstract class EntityObject: MonoBehaviour { + public static event EventHandler onAnyEntityNumberRoll; + public void SetCharacter(EntitySO entity) { Instantiate(entity.visual, transform); } + + protected void NumberRolled(int number) => onAnyEntityNumberRoll?.Invoke(this, number); } } \ No newline at end of file diff --git a/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs b/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs new file mode 100644 index 0000000..460d297 --- /dev/null +++ b/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs @@ -0,0 +1,22 @@ +using MedievalParty.Core; + +namespace MedievalParty.Entity.Player +{ + public class PlayerObject_RollDiceState: IState + { + public void OnEnter() + { + throw new System.NotImplementedException(); + } + + public void OnExit() + { + throw new System.NotImplementedException(); + } + + public void OnUpdate() + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs.meta b/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs.meta new file mode 100644 index 0000000..23213f0 --- /dev/null +++ b/Assets/Scripts/Entity/Player/PlayerObject_RollDiceState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3b9214e204e847178ba9333955b0f265 +timeCreated: 1764264682 \ No newline at end of file