public Battle(Basic_Room rm, GameObject player) { room = rm; room.CloseDoors(); playersInvolved = new List <GameObject>(); AddPlayer(player); enemiesInvolved = new List <GameObject>(); }
public Battle(Basic_Room rm, GameObject player) { room = rm; room.CloseDoors(); playersInvolved = new List <GameObject>(); AddPlayer(player); Send.InCombat(player.GetComponent <ServerPlayer>().player_id, true); enemiesInvolved = new List <GameObject>(); }
/// <summary> /// Returns the on-going battle in the selected room. /// </summary> /// <param name="room"></param> /// <returns></returns> public Battle GetBattle(Basic_Room room) { foreach (Battle battle in activeBattles) { if (battle.GetRoom().Equals(room)) { return(battle); } } return(null); }
/// <summary> /// Checks if there is a battle going on in the selected room. /// </summary> /// <param name="room"></param> /// <returns></returns> public bool BattleExists(Basic_Room room) { foreach (Battle battle in activeBattles) { if (battle.GetRoom().Equals(room)) { return(true); } } return(false); }
private void Start() { foreach (Basic_Room room in DungeonGenerator.GetInstance().allrooms) { if (room.RoomObject.Equals(gameObject)) { thisRoom = room; break; } } }