/// <summary> /// Officially starts the BattleEntity's turn. /// </summary> public void StartTurn() { OnTurnStart(); //Invoke the event TurnStartEvent?.Invoke(); }
//Battle-turn related methods public void StartTurn() { //Default to one action. If a StatusEffect changes this, it'll happen in the TurnStartEvent NumActions = 1; TurnStartEvent?.Invoke(); HandleTurnStart(); /*NOTE: We check if NumActions is 0 here then end the turn if so. If NumActions is already 0, don't allow it * to be set to any other value in ModifyNumActions(). * This fixes problems with Sleep, Fast, and other turn-modifying StatusEffects on an Entity at the same time*/ if (NumActions == 0) { EndTurn(); } }
void Init() { _hasInit = true; if (eventDictionary == null) { eventDictionary = new Dictionary <string, UnityEvent>(); } if (TurnStart == null) { turnStart = new TurnStartEvent(); } if (unitDead == null) { unitDead = new UnitDeadEvent(); } }
public void EndTurn() { TurnEndEvent?.Invoke(); TurnStartEvent?.Invoke(); }
internal virtual void Visit(TurnStartEvent evt) { // nothing to do by default }
/// <summary> /// 回合开始 /// </summary> public void TurnStart() { TurnStartEvent?.Invoke(); }