public void GenerateEnemies(Organ target, UnitTier tier, int number = 1) { var enemies = organsEnemies [target.id]; for (var i = 0; i < number; i++) { var enemy = new Enemy(target, tier); enemy.damages = Random.Range(1, 4); enemies.Add(enemy); gameUI.DrawEnemy(enemy); } }
private int hpforUnitTier(UnitTier tier) { switch (tier) { case UnitTier.None: return 10; case UnitTier.Triangle: return 50; case UnitTier.Square: return 80; case UnitTier.Octogon: return 150; case UnitTier.Circle: return 300; } return 0; }
Sprite TierToLogo(UnitTier tier) { switch (tier) { case UnitTier.Triangle: return(triangleLogo); case UnitTier.Circle: return(circleLogo); case UnitTier.Square: return(squareLogo); case UnitTier.Octogon: return(octogonLogo); default: return(null); } }
public static string GetID(UnitTier tier) { return(tier.Config.name); }
public static int GetRequirement(UnitTier tier) { return(tier.LevelRequirement); }
public override string ToString() { return("" + TroopName + " Tier: " + UnitTier.ToString() + " Allegience: " + Allegience); }
public Enemy (Organ target, UnitTier tier) { this.tier = tier; this.target = target; maxHP = hpforUnitTier (tier); currentHP = maxHP; }
public int CountEnemies(Organ organ, UnitTier tier) { return(organsEnemies [organ.id].Where(x => x.tier == tier).Count()); }