Esempio n. 1
0
    void Start()
    {
        windowHandler = GetComponent<WindowStateHandler>();
		SetState(initialState);
	}
Esempio n. 2
0
 /// <summary>
 /// Used to manage invoking all actions within the current state.
 /// The update type is passed in to determine if the action should update inside Update(), FixedUpdate(), or LateUpdate()
 /// </summary>
 /// <param name="UpdateType"></param>
 void InvokeCurrentStateAction(WindowStateHandler.Action.UpdateStyle UpdateType)
 {
     foreach (WindowStateHandler.Action action in currentState.possibleActions)
     {
         //these conditions must be met in order to invoke the action in the update type
         if (action.updateFunction == UpdateType && action.continuouslyInvokeAction)
         {
             action.StartAction.Invoke();
         }
     }
 }
Esempio n. 3
0
 void OnEnable()
 {
     ab = (WindowStateHandler)target;
     stateTarget = new SerializedObject(ab);
     m_states = stateTarget.FindProperty("states");
 }