public Wall(Level level, Vector2 position, faction faction) : base(level) { _EnemycanWalktrough = false; _Friendcanwalktrough = false; _size = 2; _position = position; _faction = faction; _maxhp = 2500; _lumberCost = 200; _goldCost = 0; _buildTime = 500; _armor = 10; _ableToProduce = true; this.Reset(); if (_faction == faction.Human) { _description = "This is a wall."; _sprite = GameEnvironment.getAssetManager().GetSprite(""); } if (_faction == faction.Orc) { _description = "Wall this is"; _sprite = GameEnvironment.getAssetManager().GetSprite(""); } }
public Townhall(Level level, Vector2 position, faction faction) : base(level) { _EnemycanWalktrough = false; _Friendcanwalktrough = true; _size = 3; _position = position; _faction = faction; _maxhp = 2000; _lumberCost = 400; _goldCost = 400; _buildTime = 1000; _armor = 0; _ableToProduce = true; this.Reset(); if (_faction == faction.Human) { _description = "This is the main building of the Human Alliance. Each settlement can only have one Town hall. It can rebuild if it is destroyed through battle."; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/HumanTownHall"); } if (_faction == faction.Orc) { _description = "This is the main building of the Orcish army. Each encampment can only have one town hall, but it can be replaced if it is destroyed in battle."; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/OrcTownHall"); } }
public void ChangeFaction(faction newFaction) { owningFaction = newFaction; CapturedTime = Time.time; LastInc = Time.time ; }
//sets up a unit public virtual void Setup(float maxHealth, movementType mvtType, faction faction, float speed, float newAtk, float newCooldown) { this.maxHealth = maxHealth; this.currHealth = maxHealth; this.movetype = mvtType; this.alignment = faction; this.speed = speed; this.atk = newAtk; this.atkCooldown = newCooldown; isDead = false; target = new List <Vector3>(); occupied = false; ignoreVision = false; currentState = state.idle; if (this.gameObject.layer == 8) { enemyLayer = "Player"; } else { enemyLayer = "AI"; } visionRadius = Vector3.Distance(sightStart.position, visionCenter.position); cachedY = energyBar.anchoredPosition.y; maxX = energyBar.anchoredPosition.x; minX = energyBar.anchoredPosition.x - energyBar.rect.width; }
public Barracks(Level level, Vector2 position, faction faction) : base(level) { _EnemycanWalktrough = false; _Friendcanwalktrough = false; _size = 2; _position = position; _faction = faction; _maxhp = 100; _lumberCost = 400; _goldCost = 400; _buildTime = 1000; _armor = 0; _ableToProduce = true; this.Reset(); if (_faction == faction.Human) { _description = "This is where units that can fight be produced."; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/HumanBarracks"); _constructionSprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/HumanBarracksConstruction"); } if (_faction == faction.Orc) { _description = "This is where the units are produced to fight"; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/OrcBarracks"); _constructionSprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/OrcBarracksConstruction"); } }
public Farm(Level level, Vector2 position, faction faction) : base(level) { _EnemycanWalktrough = true; _Friendcanwalktrough = true; _size = 2; _position = position; _faction = faction; _maxhp = 750; _lumberCost = 400; _goldCost = 400; _buildTime = 1000; _armor = 0; _ableToProduce = false; this.Reset(); if (_faction == faction.Human) { _description = "This is where food for the army is produced. You must produce enough food for all Units otherwise they will die off."; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/HumanFarm"); _constructionSprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/HumanFarmConstruction"); } if (_faction == faction.Orc) { _description = "Farms produce the grain and animals needed to keep the army well fed. You must produce enough food to supply all Orcs you control."; _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/OrcFarm"); _constructionSprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Buildings/OrcFarmConstruction"); } //FoodCreate(); }
public void Setup(float maxHealth, movementType mvtType, faction faction, float speed, float newAtk, float newCooldown, Transform pWaypoint) { base.Awake(); base.Setup(maxHealth, mvtType, faction, speed, newAtk, newCooldown); wayPointParent = pWaypoint; for (int i = 0; i < wayPointParent.childCount; i++) { target.Add(wayPointParent.GetChild(i).position); } }
public void setFaction(faction e) { if (_faction != e) { _faction = e; if (_faction == faction.Human) { _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Units/Human"); } if (_faction == faction.Orc) { _sprite = GameEnvironment.getAssetManager().GetSprite("Sprites/Units/Orc"); } } }
public Node_Get_Closest_Enemy(Dictionary<string, System.Object> blackBoard, string bb_key, float radius, faction myFaction) { m_radius = radius; m_faction = myFaction; m_dict = blackBoard; m_key = bb_key; }
public void updateFaction(faction faction, int value) { faction += value; }
public int getFaction(faction faction) { return((int)faction); }
public void setFaction(faction newFaction) { myFaction = newFaction; }