Beispiel #1
0
    public override void OnRoomEnter()
    {
        // Has this room been completed before?
        if (GameGlobals.TestGameEvent(Types.s_iGE_SwarmKilled))
        {
            m_gcSwarm.OnRoomExit();
            m_gcBarrier.TurnOffInstant(true);
            m_gcDoorLeft.CloseInstant();
            m_gcDoorBottom.CloseInstant();
            return;
        }



        m_gcBarrier.OnRoomEnter();
        m_gcSwarm.OnRoomEnter();
        MoveTowardPlayer_RoomObject gc = m_gcSwarm.GetComponent <MoveTowardPlayer_RoomObject>();

        if (null != gc)
        {
            gc.OnRoomEnter();
        }

        // First Entry, just shuffle them out of the bottom of the screen
        if (!GameGlobals.TestGameEvent(Types.s_iGE_Robotron2))
        {
            m_gcDoorRight.CloseInstant();
            if (!m_gcDoorLeft.GetIsClosed())
            {
                TimerManager.AddTimer(Types.s_fDUR_RoomEntryDoorCloseDelay, CloseDoorsFirstEntry);
            }
            m_bCheckSwarmHealth = false;
            m_gcSwarm.gameObject.GetComponent <MoveTowardPlayer_RoomObject>().enabled = false;
        }
        // Second entry, lock them in until they kill the swarm...
        else
        {
            m_gcBarrier.TurnOffInstant(true);
            m_gcDoorLeft.CloseInstant();
            m_gcDoorRight.CloseInstant();
            m_gcSwarm.gameObject.GetComponent <MoveTowardPlayer_RoomObject>().enabled = true;
            TimerManager.AddTimer(Types.s_fDUR_RoomEntryDoorCloseDelay, CloseDoorSecondEntry);
            m_bCheckSwarmHealth = true;
        }
    }
Beispiel #2
0
 public override void OnRoomEnter()
 {
     base.OnRoomEnter();
     if (GameGlobals.TestGameEvent(Types.s_iGE_Robotron2))
     {
         m_aDoorRight.CloseInstant();
         m_aBarrier.TurnOffInstant(true);
     }
 }
Beispiel #3
0
    public override void OnRoomEnter()
    {
        GAssert.Assert(null != m_gcDoorway, "rc_EmptyRoom: Doorway for game event not setup!");
        base.OnRoomEnter();

        if (!GameGlobals.TestGameEvent(Types.s_iGE_PassedLaserIntroRoom))
        {
            TimerManager.AddTimer(Types.s_fDUR_RoomEntryDoorCloseDelay, DelayedCloseDoor);
            GameGlobals.SetGameEvent(Types.s_iGE_PassedLaserIntroRoom);
        }
        else
        {
            m_gcDoorway.CloseInstant();
        }
    }