Esempio n. 1
0
        private string GetCurrentStateName()
        {
            StateComponent component = serializedObject.targetObject as StateComponent;

            if (component.CurrentState)
            {
                return($"<color=green>{component.CurrentState.name}</color>");
            }
            else
            {
                return("<color=red>None</color>");
            }
        }
Esempio n. 2
0
 public void UpdateState(StateComponent stateComponent)
 {
     foreach (var action in _stateActions)
     {
         if (action)
         {
             action.Act(stateComponent);
         }
         else
         {
             Debug.LogError($"[SCRIPTABLE STATE] {name}'s State Actions list has a null element", this);
         }
     }
 }
Esempio n. 3
0
 public abstract bool Verify(StateComponent statesComponent);
 public abstract void Act(StateComponent statesComponent);