public bool IsFree() //is the entity managed by this selection component a faction entity or a free one? { if (FactionEntity != null) { return(FactionEntity.IsFree()); } return(false); }
//a method that determines whether a faction entity belong to the local player or not public static bool IsLocalPlayer(FactionEntity factionEntity) { return(factionEntity.FactionID == GameManager.PlayerFactionID || (factionEntity.IsFree() && GameManager.MultiplayerGame && GameManager.PlayerFactionID == GameManager.HostFactionID)); }