Example #1
0
    // Update is called once per frame
    void Update()
    {
        switch (MS)
        {
        case matchStates.GameOver:
            break;

        case matchStates.BallinAction:
            break;

        case matchStates.BallReset:
            break;

        case matchStates.RPS:
            break;

        default:
            break;
        }

        if (lastMS != MS)
        {
            if (lastMS == matchStates.BallinAction)
            {
                freezePlayers();
            }
            else if (MS == matchStates.BallinAction)
            {
                unfreezePlayers();
            }
        }

        lastMS = MS;
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     MS = new matchStates();
     IM = gameObject.GetComponent <InputManager>();
 }