Ejemplo 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>");
            }
        }
Ejemplo 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);
         }
     }
 }
Ejemplo n.º 3
0
 public abstract bool Verify(StateComponent statesComponent);
 public abstract void Act(StateComponent statesComponent);