Exemplo n.º 1
0
    private void StartPhase1()
    {
        /////////////////////////////////////
        /////////////////////////////////////
        /////////////////////////////////////
        /////////////////////////////////////
        /////////////////////////////////////
        /////////////////////////////////////
        //timeElapsed = 20f;

        CurrentPhase = Phase.PHASE1;
        BossInstance = Instantiate(BossPrefab, new Vector3(0, 16.5f, 0), Quaternion.identity);
        AudioManager.Play("Chapter1BossMusic", GetComponent <AudioSource>());
        Phase1PlayerNameLabel.SetActive(true);

        var bossPosition = BossInstance.transform.position;

        Phase1StartingPosition  = bossPosition;
        Phase1MoveStartPosition = bossPosition;
        Phase1PositionToMoveTo  = new Vector3(
            bossPosition.x + Mathf.Sign(Random.Range(-1, 1)) * 10, bossPosition.y, bossPosition.z);

        Phase1TimeToHomingShooting = 5.1f - Phase1IdleTime;
        CurrentEnemy.SetCurrentEnemyName("Survive!");
    }
Exemplo n.º 2
0
 private void Start()
 {
     Player = GameObject.FindGameObjectWithTag("Player");
     AudioManager.Pause("Chapter1BossMusic", GetComponent <AudioSource>());
     CurrentEnemy.SetCurrentEnemyName("???");
     camera = Camera.main.transform;
 }
Exemplo n.º 3
0
 protected virtual void ProcessVictory()
 {
     CurrentEnemy.SetCurrentEnemyName(" ");
     isVictory = true;
     Canvas.transform.GetChild(0).gameObject.SetActive(true);
     if (Input.GetKeyDown(KeyCode.F) && !CharacterLife.isDeath)
     {
         Canvas.transform.GetChild(0).gameObject.SetActive(false);
         SceneManager.LoadScene(NextSceneName);
     }
 }
Exemplo n.º 4
0
    private void UpdatePhase4()
    {
        GlassFadeOutPassed += Time.deltaTime;
        GlassSprite.color   = new Color(
            GlassSprite.color.r, GlassSprite.color.g, GlassSprite.color.b,
            Mathf.Lerp(1, 0, GlassFadeOutPassed / GlassFadeOutDuration));

        if (BossInstance == null)
        {
            StartDead();
            CurrentEnemy.SetCurrentEnemyName(" ");
            return;
        }
        if (ArenaEnemySpawner.boysList.Count == 0)
        {
            CurrentEnemy.SetCurrentEnemyName("Shadow");
        }
        switch (phase4Attack)
        {
        case Phase4Attack.Idle:
            idleWaitTime -= Time.deltaTime;
            if (idleWaitTime <= 0)
            {
                phase4Attack     = Phase4Attack.Spawn;
                phase4FadeInLeft = phase4FadeIn;
                Phase4Spawn();
            }
            break;

        case Phase4Attack.Spawn:
            bossScript.FadeIn(phase4FadeIn);
            phase4FadeInLeft -= Time.deltaTime;
            if (phase4FadeInLeft + AfterBossFadeInExtraTime <= 0)
            {
                phase4FadeInLeft = phase4FadeIn;
                phase4Attack     = Phase4Attack.Attack;
            }
            break;

        case Phase4Attack.Attack:
            idleWaitTime = Phase4AfterAttackIdleTime;
            Random360Burst(BurstBulletAmount);
            phase4Attack = Phase4Attack.Idle;
            break;

        default:
            break;
        }
    }
Exemplo n.º 5
0
    protected override void Update()
    {
        if (firstSpawn)
        {
            SpawnСertainMonsterWithName(enemyWaves[0].transform.GetChild(2).gameObject, "Reluctance");
            SpawnZone = null;
            SpawnCertainMonsterWithoutName(enemyWaves[0].transform.GetChild(0).gameObject);
            MakeMonsterActive("Reluctance");
            CurrentEnemy.SetCurrentEnemyName("Shoot even if you can't kill it");
            firstSpawn = false;
        }

        if (isVictoryT && firstDeath)
        {
            KillThemAll();
            firstDeath = false;
            CurrentEnemy.SetCurrentEnemyName("");
        }
    }