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