Ejemplo n.º 1
0
    /// <summary>
    /// Sets the rocket to land on an object, filtering
    /// for accidental collision during reset on death,
    /// reseting the camera and checking if its a safe
    /// landing zone or not and adjusts the O2 meter
    /// accordingly
    /// </summary>
    /// <param name="body">body encountered by rocket</param>
    internal void RocketLandOn(GameObject body)
    {
        inPlay = false;
        SetCameraFollowMode(CameraMode.FollowRocket);
        rocketController.LandOn(body);
        inputController.displayRings = true;



        if (body.tag == "Planet")
        {
            lastSafeLanding = body;
            Terraform();
            SetOxygenMode(OxygenMode.Safe);
        }
        else
        {
            if (!claimedAsteroids.Contains(body))
            {
                body.GetComponent <AsteroidController>().RaiseFlag();
                claimedAsteroids.Add(body);
                oxygenMeterController.ClaimAsteroid();
            }

            SetOxygenMode(OxygenMode.Landed);
        }
    }