public void setSenderID(int senderID, eFactionName factionName, int damage) { Assert.IsTrue(m_senderID == Utilities.INVALID_ID); m_senderFaction = factionName; m_senderID = senderID; m_damage = damage; }
public bool isEnemyOnPosition(Vector2Int position, eFactionName factionName, out int targetID) { Assert.IsTrue(isInBounds(position)); if (getPoint(position).unitID != Utilities.INVALID_ID) { targetID = getPoint(position).unitID; return(getPoint(position).unitFactionName != factionName); } else { targetID = Utilities.INVALID_ID; return(false); } }
public FactionInfluenceMap(eFactionName ownerName) { m_ownerName = ownerName; Vector2Int mapSize = Map.Instance.m_mapSize; m_map = new PointOnInfluenceMap[mapSize.y, mapSize.x]; for (int x = 0; x < mapSize.x; ++x) { for (int y = 0; y < mapSize.y; ++y) { m_map[x, y] = new PointOnInfluenceMap(); } } }
public List <Unit> getOpposingFactionUnits(eFactionName sendingFaction) { switch (sendingFaction) { case eFactionName.Red: return(m_factions[(int)eFactionName.Blue].m_units); case eFactionName.Blue: return(m_factions[(int)eFactionName.Red].m_units); default: Assert.IsTrue(false); return(null); } }
public bool isOccupiedByEnemy(eFactionName factionName) { return(unitID != Utilities.INVALID_ID && factionName != unitFactionName); }
public void assign(int ID, eFactionName factionName) { unitID = ID; unitFactionName = factionName; }
public PointOnInfluenceMap getPointOnProximityMap(Vector2Int position, eFactionName factionName) { return(m_proximityMaps[(int)factionName].getPoint(position)); }