public override void Initialize(GameObject go) { _transform = go.transform; _movable = go.GetComponent <IMovable>(); _attackerable = go.GetComponent <IAttackerable>(); _teamable = go.GetComponent <ITeamable>(); }
public override void SetTarget(Actor target) { _go = target; _attackerable = _go != null?_go.GetModule <IAttackerable>() : null; }
public static bool HasTarget(this IAttackerable attackerable) => attackerable.Targets.Count > 0;
private void Start() { _attackerable = this.GetComponent <Actor>().GetModule <IAttackerable>(); enabled = (_attackerable != null); }