Exemplo n.º 1
0
    IEnumerator StageTwo(float durationOfwaitAtCages)
    {
        float extraBufferPeriod = 3.0f;

        yield return(new WaitForSeconds(durationOfwaitAtCages + extraBufferPeriod));

        //Spawn first character
        float     durationToWaitNearEnemy = 1.0f;
        Character c = charactersToSpawn[0];

        c.gameObject.SetActive(true);
        c.gameObject.transform.position = enemyEntrancePoint.transform.position;

        //Resume the movement just in case if it's paused
        if (c.GetComponent <Enemy>())
        {
            c.GetComponent <Enemy>().ResumeMovement();
        }

        EnemyBehaviorAI.ForceChaseBehavior(c.GetComponent <Enemy>(), player);
        charactersToSpawn.Remove(c);
        cameraScript.ChangeCameraProjectionSize(15, 3);
        cameraScript.FocusCameraAt(enemyEntrancePoint.transform.position, 3, durationToWaitNearEnemy);

        CageTrap.CharacterCaughtEvent += StageThree;
    }
Exemplo n.º 2
0
    IEnumerator StageThreeRoutine()
    {
        float initialWaitDuration = 2.0f;

        yield return(new WaitForSeconds(initialWaitDuration));

        //Spawn Second character
        float     durationToWaitNearEnemy = 1.0f;
        Character c = charactersToSpawn[0];

        c.gameObject.SetActive(true);
        c.gameObject.transform.position = enemyEntrancePoint.transform.position;

        //Resume the movement just in case if it's paused
        if (c.GetComponent <Enemy>())
        {
            c.GetComponent <Enemy>().ResumeMovement();
        }

        EnemyBehaviorAI.ForceChaseBehavior(c.GetComponent <Enemy>(), player);
        charactersToSpawn.Remove(c);

        cameraScript.FocusCameraAt(enemyEntrancePoint.transform.position, 3, durationToWaitNearEnemy);

        CageTrap.CharacterCaughtEvent += StageFour;
    }
Exemplo n.º 3
0
 void StartChase()
 {
     for (int i = 0; i < objectsToSpawn.Count; i++)
     {
         EnemyBehaviorAI.ForceChaseBehavior(objectsToSpawn[i].GetComponent <Enemy>(), player);
     }
 }