示例#1
0
 protected override void HandleTimedEvents()
 {
     RemoveDeadTrooperFromArray();
     if (timer <= EVENT_TIME_FRONT_TROOPER && trooperFrontIndex < NUM_TROOPERS)
     {
         SpawnFrontTrooper();
     }
     else if (timer == EVENT_TIME_OPEN_SIDE_DOORS)
     {
         leftDoor.Open();
         rightDoor.Open();
         // hide level text
         instructions.SetInstruction(CollectiveInstructions.InstType.NONE);
     }
     else if (timer == EVENT_TIME_LEFT_TROOPER && trooperLeftIndex < NUM_TROOPERS)
     {
         SpawnLeftTrooper();
     }
     else if (timer == EVENT_TIME_RIGHT_TROOPER && trooperRightIndex < NUM_TROOPERS)
     {
         SpawnRightTrooper();
     }
     else if (HasFinishedSpawning())
     {
         status = Status.Open;
     }
     timer++;
     timer %= 200;
 }
示例#2
0
 private void PlaySceneEvents()
 {
     if (timer < START)
     {
         door.Open();
         player.Rotate(faceDoor.transform.position);
         troopers[LevelScene.POSITION_LEFT_INDEX].Rotate(player.GetLeft().transform.position);
         troopers[LevelScene.POSITION_RIGHT_INDEX].Rotate(player.GetRight().transform.position);
         troopers[LevelScene.POSITION_FRONT_INDEX].Rotate(player.GetFront().transform.position);
         timer = START;
         instructions.SetInstruction(CollectiveInstructions.InstType.LEVEL_1);
     }
     else if (timer == TROOPER_LEFT_START)
     {
         instructions.SetInstruction(CollectiveInstructions.InstType.NONE);
         troopers[LevelScene.POSITION_LEFT_INDEX].Move(player.GetLeft().transform.position);
     }
     else if (timer == TROOPER_RIGHT_START)
     {
         troopers[LevelScene.POSITION_RIGHT_INDEX].Move(player.GetRight().transform.position);
     }
     else if (timer == TROOPER_FRONT_START)
     {
         troopers[LevelScene.POSITION_FRONT_INDEX].Move(player.GetFront().transform.position);
     }
     else if (timer >= 120)
     {
         status = Status.Open;
     }
     timer++;
 }
示例#3
0
 protected override void IssueCinematics()
 {
     Debug.Log("Starting cinematics.");
     door.Open();
     boss.gameObject.SetActive(true);
     boss.gameObject.transform.position = spawnPoint.transform.position;
     musicManager.SetMusic(MusicManager.MUSIC.BOSS);
     musicManager.SetVoice(MusicManager.VOICE.PRE_BOSS);
 }
    public override void OpenScene()
    {
        ScoreBoard.GetInstance().StartLevel();
        musicManager.SetVoice(MusicManager.VOICE.TUTORIAL_END);
        player.ResetEntity();
        instructions.SetInstruction(CollectiveInstructions.InstType.GET_READY);
        blastDoor.Open();

        status = Status.Opening;
        timer  = 0;
    }
示例#5
0
 protected override void IssueCinematics()
 {
     Debug.Log("Starting cinematics");
     trooperLeftIndex  = 0;
     trooperRightIndex = 0;
     trooperFrontIndex = 0;
     for (int i = 0; i < 3; i++)
     {
         far[i]  = null;
         near[i] = null;
     }
     frontDoor.Open();
     for (int i = 0; i < NUM_TROOPERS; i++)
     {
         PlaceStormTroopers(i);
     }
 }