Ejemplo n.º 1
0
        public static void OnLoadStart()
        {
            LevelPlayground.SetLevelState(LevelPlayground.LevelState.Unknown);
            Scenes.GoToScene(Scenes.Types.Start);

            Server.Report(Server.ReportComands.RestartLevel);
        }
Ejemplo n.º 2
0
    private void OnLose()
    {
        Destroy(gameObject);

        LevelPlayground.SetLevelState(LevelPlayground.LevelState.LoseLevel);

        Scenes.GoToScene(Scenes.Types.Result);
    }
Ejemplo n.º 3
0
        public static void OnContinueLevelByMoney()
        {
            GameData.ReduceCurrency(Configs.Balance.PaymentForContinue);
            LevelPlayground.SetLevelState(LevelPlayground.LevelState.Unknown);

            Server.Report(Server.ReportComands.NextLevelByMoney);

            Scenes.GoToScene(Scenes.Types.Level);
        }
Ejemplo n.º 4
0
        public static void OnContinueLevel()
        {
            LevelPlayground.Resetlevels();
            LevelPlayground.SetLevelState(LevelPlayground.LevelState.Unknown);

            Server.Report(Server.ReportComands.NextLevel);

            Scenes.GoToScene(Scenes.Types.Level);
        }
Ejemplo n.º 5
0
    public static void RestartGame()
    {
        Scenes.ResetManager();
        Configs.ResetManager();
        Profile.ResetManager();
        Events.ResetManager();
        Sounds.ResetManager();
        Server.ResetManager();

        LevelPlayground.SetLevelState(LevelPlayground.LevelState.Unknown);
        Scenes.GoToScene(Scenes.Types.Start);

        Debug.Log("Game restarted");
    }
Ejemplo n.º 6
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (mIsFired)
        {
            return;
        }

        if (other.gameObject.name == "Wheel")
        {
            OnTriggerWheel(other.gameObject);
            Events.LaunchEvent(Events.Types.NextBullet, Scenes.ActiveScene);
        }
        else if (other.gameObject.name == "barrier" || other.gameObject.name == "bullet")
        {
            LevelPlayground.SetLevelState(LevelPlayground.LevelState.LoseLevel);
            LevelPlayground.ActiveBulletIndex = 0;
            OnTriggerBarrier(other.gameObject);
        }
    }