Example #1
0
	public void ShowAttackTarget (GameUnit attacker, int range)
	{
		this.attacker = attacker;
		this.range = range;
		for (int i = 0; i < unitList.Count; i++) {
			GameUnit temp = unitList [i];
			if (attacker.IsEnemy (temp) == true) {
				if (Mathf.Abs (temp.X - attacker.X) <= range && Mathf.Abs (temp.Y - attacker.Y) <= range) {
					temp.ShowAttactedState ();
				}
			}
		}
	}