예제 #1
0
 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]);
         }
     }
 }
예제 #2
0
    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.");
            }
        }
    }
예제 #3
0
 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");
 }
예제 #4
0
 void Awake()
 {
     lm = GameObject.FindGameObjectWithTag("Dm").GetComponent<Loot_Manager>();
 }