Ejemplo n.º 1
0
    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>();
    }
Ejemplo n.º 3
0
    public override Vector3 CardPosition(Card_Animation_FSM_Script input)
    {
        float child = input.transform.GetSiblingIndex();

        float count = myCards.Length;

        if (count < 2)
        {
            return Vector3.zero;
        }

        return new Vector3(Mathf.Lerp(-2f, 2f, child / (count - 1)), 0f, 0f);
    }
Ejemplo n.º 4
0
 public abstract Quaternion CardRotation(Card_Animation_FSM_Script input);
Ejemplo n.º 5
0
 public abstract Vector3 CardPosition(Card_Animation_FSM_Script input);
Ejemplo n.º 6
0
 public override Quaternion CardRotation(Card_Animation_FSM_Script input)
 {
     return Quaternion.identity;
 }
Ejemplo n.º 7
0
 public override Vector3 CardPosition(Card_Animation_FSM_Script input)
 {
     return Vector3.forward * Card_Animation_FSM_Script.CardSize().z * input.transform.GetSiblingIndex();
 }