コード例 #1
0
 static void DefineCombatMemberTriggers(TriggersHost triggersHost, CombatMember combatMember)
 {
     foreach (var ability in combatMember.GetAbilities())
     {
         triggersHost.AddTrigger(CombatTriggersFactory.Create(ability));
     }
 }
コード例 #2
0
        public void Attack(CombatMember combatMember)
        {
            var member = GetComponent <CombatMember>();

            // TODO Consider how to properly call it so that we don't brake incapsulation.
            member.StopAllAbility();

            enabled = true;
            pathfinder.Follow(combatMember.transform);
            target = combatMember;
        }
コード例 #3
0
        public override void Stop()
        {
            if (!target)
            {
                return;
            }

            if (pathfinder.IsFollow(target.transform))
            {
                pathfinder.Follow(null);
            }
            target = null;
        }