Esempio n. 1
0
 public void Behave()
 {
     if (!dead)
     {
         behavior.Behave();
     }
 }
        /// <summary>
        /// Executes behavior with given context
        /// </summary>
        /// <param name="context">The context.</param>
        /// <returns></returns>
        public override BehaviorReturnCode Behave(IBehaviorContext context)
        {
            PlayerBehaviorContext playerContext = context as PlayerBehaviorContext;

            if (playerContext == null)
            {
                returnCode = BehaviorReturnCode.Failure;
                return(returnCode);
            }

            Behavior = playerContext.Player.Race.TradeBehavior;
            if (Behavior == null)
            {
                returnCode = BehaviorReturnCode.Failure;
                return(returnCode);
            }

            returnCode = Behavior.Behave(context);
            return(returnCode);
        }
Esempio n. 3
0
 public void OnCardDestroy()
 {
     destroyBehavior.Behave();
 }
Esempio n. 4
0
 public void OnCardInvoke()
 {
     invokeBehavior.Behave();
 }
Esempio n. 5
0
 public override BehaviorReturnCode Behave()
 {
     return(s_Behavior.Behave());
 }
Esempio n. 6
0
 public BehaviorReturnCode Behave()
 {
     return(behavior.Behave());
 }
Esempio n. 7
0
 public void OnDefence()
 {
     defenseBehavior.Behave();
 }
Esempio n. 8
0
 public void OnAttack()
 {
     attackBehavior.Behave();
 }