示例#1
0
    //***************************************************************************************************************


    // Platform counter
    private void PlatformCounter()
    {
        if (EnemySpawnerManager.BossCleared() == true)
        {
            platformScoreTotal        = 0;
            platformCount             = PlatformHealthPoint.Count;
            platformScoreMax          = scorePerSurvivedPlatform * platformCount;
            platformScoreCounterTimer = platformScoreCounterSpeed;
            platformCounterActive     = true;
        }

        if (platformCounterActive == false)
        {
            return;
        }


        bool done = ScoreCounter(ref platformScoreTotal, platformScoreMax, platformScoreCounterIncrement,
                                 ref platformScoreCounterTimer, platformScoreCounterSpeed);

        if (done == true)
        {
            platformCounterActive = false;
            AddPlayerScore(platformScoreTotal);
        }
    }
示例#2
0
 /// <summary>
 /// method call when the class is created,
 /// -set itself to the Game MAnager
 /// -call the level to star
 ///
 /// The idea is to have ome checking to know which level should be loaded, and then call Start level with the level number
 /// </summary>
 private void Awake()
 {
     _levelTime = 0;
     GameManager.Instance.LevelManager = this;
     _enemySpawnerManager = GetComponent <EnemySpawnerManager>();
     // call to start the level, by defaul will load the level 1, the idea is to change this value to load different levels
     StartLevel();
 }
 private void OnDestroy()
 {
     if (_BGM != null)
     {
         AudioManager.Instance.PlayDefaultMusic();
     }
     EnemySpawnerManager.StartProcess();
 }
 private void Start()
 {
     EnemySpawnerManager.StopProcess();
     if (_BGM != null)
     {
         AudioManager.Instance.ChangeMusic(_BGM);
     }
 }
    void Destroy()
    {
        if (routine != null)
        {
            StopCoroutine(routine);
        }

        routine  = null;
        instance = null;
    }
示例#6
0
    //**************************************************************************************************************

    private void Start()
    {
        // Enemy spawn manager
        enemySpawnerManager = GetComponentInParent <EnemySpawnerManager>();
        // Positions
        CreateSpawnPositions();
        // Start up
        SpawnerStartup();
        // Deactivate self
        //gameObject.SetActive(false);
    }
 void Awake()
 {
     instance = this;
 }
 private void Start()
 {
     enemySpawnerManager = GameObject.Find("EnemySpawner").GetComponent <EnemySpawnerManager>();
 }
示例#9
0
 // Start is called before the first frame update
 void Start()
 {
     _spawnerManager = FindObjectOfType <EnemySpawnerManager>();
 }