コード例 #1
0
        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);
        }
コード例 #2
0
        protected override bool Run(BehaviorTree behaviorTree, BTEnv env)
        {
            Unit unit = env.Get <Unit>(this.Unit);

            return(unit == null);
        }
コード例 #3
0
        protected override bool Run(BehaviorTree behaviorTree, BTEnv env)
        {
            int team = env.Get <int>(this.Team);

            return(team == 1);
        }