Esempio n. 1
0
 /// <summary>
 /// Function to call when the conditions to complete the state
 /// have been achieved. Call base as final action in overrides.
 /// </summary>
 public virtual void StateComplete()
 {
     CTEventManager.FireEvent(new GameEvents.StateComplete()
     {
         StateType = this.GetType()
     });
 }
Esempio n. 2
0
 public void Play()
 {
     if (MatchStateManager.Instance.CurrentState is OffenceState)
     {
         CTEventManager.FireEvent(new GameEvents.PlayAction()
         {
             PlayType = ePlayType.Offensive, PointValue = CardValue
         });
     }
     else if (MatchStateManager.Instance.CurrentState is DefenceState)
     {
         CTEventManager.FireEvent(new GameEvents.PlayAction()
         {
             PlayType = ePlayType.Defensive, PointValue = CardValue
         });
     }
 }
Esempio n. 3
0
 void Start()
 {
     CTEventManager.FireEvent(new CTEvent1()
     {
         message = "message 1"
     });
     CTEventManager.FireEvent(new CTEvent2()
     {
         message = "message 2"
     });
     CTEventManager.FireEvent(new CTEvent1()
     {
         message = "message 3"
     });
     CTEventManager.FireEvent(new CTEvent2()
     {
         message = "message 4"
     });
 }