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);
        }
    }
Exemple #2
0
	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;
	}
Exemple #3
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);
        }
    }
Exemple #4
0
 public static string GetID(UnitTier tier)
 {
     return(tier.Config.name);
 }
Exemple #5
0
 public static int GetRequirement(UnitTier tier)
 {
     return(tier.LevelRequirement);
 }
Exemple #6
0
 public override string ToString()
 {
     return("" + TroopName + " Tier: " + UnitTier.ToString() + " Allegience: " + Allegience);
 }
Exemple #7
0
	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());
 }