Ejemplo n.º 1
0
    public void ResetWave()
    {
        // destroy all enemies
        foreach (GameObject g in enemies)
        {
            Destroy(g);
        }
        enemies = new List <GameObject>();

        foreach (ZombieBehavior z in GameObject.FindObjectsOfType <ZombieBehavior>())
        {
            Destroy(z.gameObject);
        }
        // get rid of blood splatters
        _gameCanvas.ResetDamage();

        // turn on gun and reticle
        if (reticle != null)
        {
            if (usedevRoom)
            {
                reticle.SetActive(true);
            }
        }
        //if no gun->reset gunfor wave
        isDead = false;

        //disable game over tag along screen
        youDiedScreen.SetActive(false);

        WaveStartedGraphics();
        StemKitMNGR.CALL_ToggleStemInput(true);
    }
Ejemplo n.º 2
0
    //todo: find a better way to initialize the gun in had in any other way than a timer... bad programming
    void SetGun()
    {
        StemKitMNGR.Call_GunSetChangeTo(GunType.MAGNUM);
        StemKitMNGR.CALL_UpdateAvailableGUnIndex(3);
        StemKitMNGR.CALL_ToggleAllowExtraButtons(true);
        StemKitMNGR.CALL_ToggleStemInput(true);

        if (_stmKitMngr == null)
        {
            Debug.Log("we loaded the stemstation, but cannot get the stemkitMNGrScript");
        }
    }
Ejemplo n.º 3
0
 //this was on a timer 5sec in wm the first time
 public void StartWave()
 {
     //   Debug.Log("3 waveSTD StartWave");
     GameManager.Instance.curgamestate = ARZState.WavePlay;
     StartCoroutine(ie_StartWaveTimer());
     FillAllSpawnpoints_onlyonStart();
     //  print(WaveGun.ToString() + " <--mu gun");
     StemKitMNGR.Call_GunSetChangeTo(WaveGun);
     StemKitMNGR.CALL_UpdateAvailableGUnIndex((int)WaveGun);
     StemKitMNGR.CALL_ResetGunAndMeter();
     StemKitMNGR.CALL_ToggleStemInput(true);
 }
Ejemplo n.º 4
0
    public void PlayerDied_GameManager()
    {
        isDead = true;
        StemKitMNGR.CALL_ToggleStemInput(false);
        _scoreManager.Increment_DeathsCNT();

        // turn off gun and reticle
        if (reticle != null)
        {
            reticle.SetActive(false);
        }

        // pause all enemies
        foreach (GameObject g in enemies)
        {
            g.GetComponent <ZombieBehavior>().Zbeh_PauseZombieAnimation();
        }

        if (gameTimeIsUp)
        {
            Debug.Log("gameover yo");
            // game over
            _gameCanvas.FinalScore(_scoreManager.Get_PointsTotal());
            gameOverScreen.SetActive(true);
            _waveManager.StopTheGame();
        }
        else
        {
            //*******************************************************************************************************************
            //THIS NEVER HAPPENED gametimeIsup is Never set to true bcause nothing ever calst TimeUp() , instead we use HArdStop
            //*******************************************************************************************************************
            int CurWavePoints = _scoreManager.Get_PointsCurWave();

            _gameCanvas.PointsLost(CurWavePoints);

            _scoreManager.Update_Add_PointsTotalLost(CurWavePoints);
            _scoreManager.Update_Remove_PointsTotal(CurWavePoints);
            _scoreManager.Reset_WavePoints();

            ScoreDebugCon.Instance.update_WAVEPoints(0);


            youDiedScreen.SetActive(true);

            // tell wave manager whether or not to reload wave via if time is up
            //OnGameOver_WaveManager(false);
            _waveManager.KeepPlaying();
        }

        _gameCanvas.PlayGameOverAudio();
    }
Ejemplo n.º 5
0
    //public PlayerInfoEntry pdi;

    public void HardStop()
    {
        // tell wave manager whether or not to reload wave via if time is up
        // waveManager.OnGameOver_WaveManager(true);
        _waveManager.StopTheGame();
        StemKitMNGR.CALL_ToggleStemInput(false);

        // pause all enemies
        foreach (GameObject g in enemies)
        {
            g.GetComponent <ZombieBehavior>().Zbeh_PauseZombieAnimation();
        }

        // game over
        _gameCanvas.FinalScore(_scoreManager.Get_PointsTotal());
        gameOverScreen.SetActive(true);
        _gameCanvas.PlayGameOverAudio();

        curgamestate = ARZState.EndGame;

        PersistantScoreGrabber.Instance.DoGrabScores();
        PersistantScoreGrabber.Instance.DoGrabLines();
        StartCoroutine(AUTOGOTO_DataEntry());
    }
Ejemplo n.º 6
0
 public void TimesUp()
 {
     curgamestate = ARZState.EndGame;
     gameTimeIsUp = true;
     StemKitMNGR.CALL_ToggleStemInput(false);
 }