void Awake()
    {
        myCardAnimationFSM = GetComponent<Card_Animation_FSM_Script>();

        myTransitionStates = new Finite_State_Script[1];
        myTransitionStates[0] = GetComponent<Card_Highlighted_State_Script>();
    }
    void Awake()
    {
        myCardAnimationFSM = GetComponent<Card_Animation_FSM_Script>();

        myTransitionStates = new Finite_State_Script[2];
        myTransitionStates[0] = GetComponent<Card_Resting_State_Script>();
        myTransitionStates[1] = GetComponent<Card_Selected_State_Script>();
    }
Example #3
0
 //checks to see if the transition is a valid transition for this state machine
 public bool IsValidTransition(Finite_State_Script input)
 {
     foreach (Finite_State_Script state in myTransitionStates)
     {
         if (input == state)
         {
             return true;
         }
     }
     return false;
 }