Exemple #1
0
        public override bool Run()
        {
            try
            {
                IPerform definition = InteractionDefinition as IPerform;

                return(definition.Perform(this, Actor, Target, Hit) != OptionResult.Failure);
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }
 public override bool Equals(IPerform <TComparand, TInput> other)
 {
     return(other is PerformStateContextChange <TComparand, TInput, TContextIn, TContextOut> otherTransition && (this.transition == otherTransition.transition) && base.Equals(other));
 }
 public virtual bool Equals(IPerform <TComparand, TInput> other)
 {
     return(other is PerformActionBase <TComparand, TInput, TContextIn, TContextOut> otherAction && this.Next.Perform.Equals(otherAction.Next.Perform));
 }
 public bool Equals(IPerform <TComparand, TInput> other)
 {
     return(other is PerformConstant <TComparand, TInput, TContext> otherConstant && this.Target == otherConstant.Target && this.Yield == otherConstant.Yield);
 }
 public override bool Equals(IPerform <TComparand, TInput> other)
 {
     return(other is PerformStateAction <TComparand, TInput, TContext> otherAction && (this.action == otherAction.action) && base.Equals(other));
 }
Exemple #6
0
 public bool Equals(IPerform <TComparand, TInput> other)
 {
     return(other is PerformInputDynamic <TComparand, TInput, TContext> otherDynamic && this.computeState == otherDynamic.computeState && this.Yield == otherDynamic.Yield);
 }
Exemple #7
0
 public void SetPerformance(IPerform perform)
 => _perform = perform;