コード例 #1
0
 private void SpawnInitialWallMaster()
 {
     for (int i = 0; i < wallMasterCounter; i++)
     {
         AllObjects.Spawn(new Hand(spriteBatch, GenerateRandomWallMasterSpawnPoint(), roomToJumpTo));
     }
 }
コード例 #2
0
        private void SpawnWalls()
        {
            AllObjects.Spawn(new SecretRoomWall(RoomConstants.LeftWallRectangle));
            AllObjects.Spawn(new SecretRoomWall(RoomConstants.MiddleWallRectangle));
            AllObjects.Spawn(new SecretRoomWall(RoomConstants.RightWallRectangle));
            AllObjects.Spawn(new SecretRoomWall(RoomConstants.TopWallRectangle));

            AllObjects.Spawn(new RoomChangeTrigger(Constants.Direction.Stairs, RoomConstants.SecretRoomRoomChangeTrigger));
        }
        public override void Update()
        {
            if (!spawnedKey && AllObjects.NpcList.Count == 0 && key != null)
            {
                AllObjects.Spawn(key);
                spawnedKey = true;
            }

            base.Update();
        }
コード例 #4
0
 public override void Update()
 {
     spawnDelayCounter++;
     if (spawnDelayCounter >= wallMasterSpawnDelay && wallMasterCounter <= wallMasterToSpawn)
     {
         AllObjects.Spawn(new Hand(spriteBatch, GenerateRandomWallMasterSpawnPoint(), roomToJumpTo));
         spawnDelayCounter = 0;
         wallMasterCounter++;
     }
     base.Update();
 }
コード例 #5
0
 public override void Update()
 {
     if (!openedDoor && AllObjects.NpcList.Count == 0)
     {
         GetDoor(Constants.Direction.Right).OpenDoor();
         openedDoor = true;
         if (heartContainer != null)
         {
             AllObjects.Spawn(heartContainer);
         }
     }
     base.Update();
 }