示例#1
0
    void OnCollisionEnter(Collision collision)
    {
        if (collision.collider.name == "MeteoColliderPad")
        {
            rb.isKinematic   = true;
            transform.parent = GameObject.Find("SpaceShip").transform;

            explosionScript.FirstExplosion(collision.contacts[0].point);
            sound.PlayOneShot(sound.clip);
            GlobalEventLog.isCrash       = true;
            GlobalEventLog.radioFixed    = false;
            GlobalEventLog.joystickFixed = false;
            collisionTime = Time.time;
        }
    }