Esempio n. 1
0
        void OnTriggerExit(Collider other)
        {
            if (other.gameObject.name == "Basket Top" && m_phase == BasketPhase.BOTH)
            {
                m_phase = BasketPhase.BOTTOM;
            }
            else if (other.gameObject.name == "Basket Bottom" && m_phase == BasketPhase.BOTTOM)
            {
                m_phase = BasketPhase.NONE;

                switch (PlatformManager.CurrentState)
                {
                case PlatformManager.State.PLAYING_A_LOCAL_MATCH:
                case PlatformManager.State.PLAYING_A_NETWORKED_MATCH:
                    if (m_owningPlayer)
                    {
                        m_owningPlayer.Score += 2;
                    }
                    break;
                }
            }
            else
            {
                m_phase = BasketPhase.NONE;
            }
        }
Esempio n. 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Basket Top" && m_phase == BasketPhase.NONE)
     {
         m_phase = BasketPhase.TOP;
     }
     else if (other.gameObject.name == "Basket Bottom" && m_phase == BasketPhase.TOP)
     {
         m_phase = BasketPhase.BOTH;
     }
     else
     {
         m_phase = BasketPhase.NONE;
     }
 }