private void AttackCycle(GameObject obj) { Entity entity = obj.GetComponent <Entity> (); if (entity != null && entity.GetAffiliation() != this.faction) { attackTimer = attackDelaySeconds; Attacks.AoeAttack(projectile, this.transform.GetChild(0).gameObject, obj, damage); } }