Esempio n. 1
0
    public void ChargeJump()
    {
        Planet planet = body.getClosestPlanet();

        if (planet != null)
        {
            if (planet.isPlanetCorrupted())
            {
                PlanetCorrupted pc = (PlanetCorrupted)planet;
                if (pc.getPlanetEventsManager() != null)
                {
                    pc.getPlanetEventsManager().chargeSpaceJumping();
                }
            }
        }
        GUIManager.deactivatePlayingGUI();
        bpAnimator.SetBool("isChargingSpaceJumping", true);
        isChargingSpaceJump = true;
        GameManager.mainCamera.GetComponent <CameraFollowingPlayer> ().setObjectiveZCameraOnSpaceJump();
        ParticleSystem particles = particleSystemJumpCharge.GetComponent <ParticleSystem> ();

        particles.Play();
        StopMove();
        ShowArrow();
    }
Esempio n. 2
0
    public static void restartGame()
    {
        Planet planet = playerSpaceBody.getClosestPlanet();

        if (planet != null && planet.isPlanetCorrupted())
        {
            PlanetCorrupted planetCorrupted = (PlanetCorrupted)planet;
            if (planetCorrupted.getPlanetEventsManager() != null)
            {
                planetCorrupted.getPlanetEventsManager().onFadeOutAfterDeath();
            }
        }

        rebuildGameFromGameState();

        isGameEnded = false;
        //GUIManager.activatePlayingGUIWithFadeIn();
        GUIManager.fadeOutChangeMenuFadeIn(Menu.None);
    }