Example #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);
        }
Example #3
0
 public void OnCardDestroy()
 {
     destroyBehavior.Behave();
 }
Example #4
0
 public void OnCardInvoke()
 {
     invokeBehavior.Behave();
 }
Example #5
0
 public override BehaviorReturnCode Behave()
 {
     return(s_Behavior.Behave());
 }
Example #6
0
 public BehaviorReturnCode Behave()
 {
     return(behavior.Behave());
 }
Example #7
0
 public void OnDefence()
 {
     defenseBehavior.Behave();
 }
Example #8
0
 public void OnAttack()
 {
     attackBehavior.Behave();
 }