示例#1
0
    /*
     * \brief Called when this first collides with something
     */
    void OnCollisionEnter(Collision collision)
    {
        if (m_playerState == PlayerState.FallingFromTower)
        {
            return;
        }

        m_physics.CallOnCollisionEnter(collision);
    }
    /*
     * \brief Called when this first collides with something
     */
    void OnCollisionEnter(Collision collision)
    {
        if (m_playerState == PlayerState.InCutScene)
        {
            return;
        }

        if (m_playerState == PlayerState.FallingFromTower)
        {
            return;
        }

        if (collision.collider.gameObject.name == "Electricity")
        {
            PushPlayerFromTower();
        }

        m_physics.CallOnCollisionEnter(collision);
    }
示例#3
0
 /*
  * \brief Called when this first collides with something
  */
 void OnCollisionEnter(Collision collision)
 {
     m_physics.CallOnCollisionEnter(collision);
 }