Ejemplo n.º 1
0
        protected override bool Run(BehaviorTree behaviorTree, BTEnv env)
        {
            Vector3 v3 = env.Get <Vector3>(this.Vector3Key);

            float v = 0;

            switch (VType)
            {
            case VType.X:
                v = v3.x;
                break;

            case VType.Y:
                v = v3.y;
                break;

            case VType.Z:
                v = v3.z;
                break;
            }
            env.Add(this.V, v);
            return(true);
        }
Ejemplo n.º 2
0
 protected override bool Run(BehaviorTree behaviorTree, BTEnv env)
 {
     UnityEngine.GameObject gameObject = env.Get <GameObject>(this.GameObject);
     gameObject.SetActive(this.Value);
     return(true);
 }
        private Unit GetUnit(BTEnv env)
        {
            Unit unit = env.Get <Unit>(this.UnitKey);

            return(unit);
        }
Ejemplo n.º 4
0
 public bool DoRun(BehaviorTree behaviorTree, BTEnv env)
 {
     env.Get <List <long> >(BTEnvKey.NodePath).Add(this.NodeProto.Id);
     return(this.Run(behaviorTree, env));
 }