private static void CheckForDeadMobs(Room room) { for (int i = room.mobList.Count - 1; i >= 0; i--) { if (!room.mobList[i].Alive) { Loot_Manager.DropLootOnMobDeath(room, room.mobList[i]); room.RemoveChild(room.mobList[i]); room.mobList.Remove(room.mobList[i]); } } }
void HandleUpdate() { if (_roomTransitionDirection != Direction.None) { DoRoomTransition(_roomTransitionDirection); } else { HandleInputs(); HandlePlayerAttacking(); TestForPlayerCollisionsWithEnvironment(); HandlePlayerMovement(); FSM_Manager.HandleMobAI(player, _dungeon.CurrentRoom); Combat_Manager.HandleProjectileMovement(_dungeon.CurrentRoom); Combat_Manager.CheckCombatCollisions(player, _dungeon.CurrentRoom); Loot_Manager.CheckForPlayerLootCollisions(player, _dungeon.CurrentRoom); // ** HANDLE PLAYER DEATH SOMETIME if (!player.Alive) { Debug.Log("Player Death."); } } }
void Start() { startPos = transform.position; curHP = maxHP; dm = GameObject.FindGameObjectWithTag("Dm"); audio_S = GetComponent<AudioSource>(); lm = dm.GetComponent<Loot_Manager>(); am = dm.GetComponent<Audio_Manager>(); playerAmount = PlayerPrefs.GetInt("Players"); }
void Awake() { lm = GameObject.FindGameObjectWithTag("Dm").GetComponent<Loot_Manager>(); }