protected override bool Run(BehaviorTree behaviorTree, BTEnv env) { float a = env.Get <float>(this.AKey); switch (Operator) { case Operator.EQ: return(a == this.Value); case Operator.GE: return(a >= this.Value); case Operator.GT: return(a > this.Value); case Operator.LE: return(a <= this.Value); case Operator.LT: return(a < this.Value); } return(true); }
protected override bool Run(BehaviorTree behaviorTree, BTEnv env) { Unit unit = env.Get <Unit>(this.Unit); return(unit == null); }
protected override bool Run(BehaviorTree behaviorTree, BTEnv env) { int team = env.Get <int>(this.Team); return(team == 1); }