Exemple #1
0
 // Reset the public variables
 public override void OnReset()
 {
     speed = 10;
     angularSpeed = 10;
     fleedDistance = 20;
     lookAheadDistance = 5;
 }
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     successProbability = 0.5f;
     seed = 0;
     useSeed = false;
 }
Exemple #3
0
 public override void OnReset()
 {
     targetGameObject = null;
     point = Vector3.zero;
     axis = Vector3.zero;
     angle = 0;
 }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     tree = GetComponent<BehaviorTree> ();
     hasEnemy = (SharedBool)tree.GetVariable ("hasEnemy");
     enemy = (SharedGameObject)tree.GetVariable ("enemy");
     hp = (SharedFloat)tree.GetVariable ("hp");
 }
Exemple #5
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            targetDistPrediction = 20;
            targetDistPredictionMult = 20;
            target = null;
        }
 public override void OnReset()
 {
     start = Vector3.zero;
     end = Vector3.zero;
     color = Color.white;
     duration = 0f;
     depthTest = true;
 }
Exemple #7
0
 public override void OnReset()
 {
     targetGameObject = null;
     stateName = "";
     transitionDuration = 0;
     layer = -1;
     normalizedTime = float.NegativeInfinity;
 }
 public override void OnReset()
 {
     targetGameObject = null;
     targetObject = null;
     targetPosition = Vector3.zero;
     ignoreHeight = true;
     storeValue = 0;
 }
Exemple #9
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     waitTime = 1;
     randomWait = false;
     randomWaitMin = 1;
     randomWaitMax = 1;
 }
Exemple #10
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            randomPatrol = false;
            waypointPauseDuration = 0;
            waypoints = null;
        }
Exemple #11
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            fleedDistance = 20;
            lookAheadDistance = 5;
            target = null;
        }
 public override void OnReset()
 {
     targetGameObject = null;
     weight = 0;
     bodyWeight = 0;
     headWeight = 1;
     eyesWeight = 0;
     clampWeight = 0.5f;
 }
Exemple #13
0
 public override void OnReset()
 {
     targetGameObject = null;
     explosionForce = 0;
     explosionPosition = Vector3.zero;
     explosionRadius = 0;
     upwardsModifier = 0;
     forceMode = ForceMode.Force;
 }
 // Reset the public variables
 public override void OnReset()
 {
     usePhysics2D = false;
     rotationEpsilon = 0.5f;
     maxLookAtRotationDelta = 1f;
     onlyY = false;
     target = null;
     targetRotation = Vector3.zero;
 }
Exemple #15
0
 public override void OnReset()
 {
     originGameObject = null;
     originPosition = Vector3.zero;
     direction = Vector3.zero;
     distance = -1;
     layerMask = -1;
     space = Space.Self;
 }
Exemple #16
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            neighborDistance = 100;
            lookAheadDistance = 5;
            alignmentWeight = 0.4f;
            cohesionWeight = 0.5f;
            separationWeight = 0.6f;
        }
Exemple #17
0
        public override TaskStatus OnUpdate()
        {
            if (light == null) {
                Debug.LogWarning("Light is null");
                return TaskStatus.Failure;
            }

            storeValue = light.shadowStrength;
            return TaskStatus.Success;
        }
Exemple #18
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            neighborDistance = 10;
            separationDistance = 2;
            maxQueueAheadDistance = 2;
            maxQueueRadius = 20;
            slowDownSpeed = 0.15f;
        }
Exemple #19
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            target = null;
            evadeDistance = 10;
            lookAheadDistance = 5;
            targetDistPrediction = 20;
            targetDistPredictionMult = 20;
        }
Exemple #20
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnStart();

            maxCoverDistance = 1000;
            maxRaycasts = 100;
            rayStep = 1;
            coverOffset = 2;
            lookAtCoverPoint = false;
            rotationEpsilon = 0.5f;
        }
Exemple #21
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            wanderDistance = 10;
            wanderRate = 1;
            fieldOfViewAngle = 90;
            viewDistance = 30;
            senseAudio = true;
            hearingRadius = 30;
            audibilityThreshold = 0.05f;
        }
Exemple #22
0
 // Update is called once per frame
 void Update()
 {
     Collider[] colliders= Physics.OverlapSphere (transform.position,warnRange,LayerMask.GetMask("Enemy"));
     if (colliders.Length > 0) {
         hp = (SharedFloat)colliders [0].gameObject.GetComponent<BehaviorTree> ().GetVariable ("hp");
         if (hp.Value > 0) {
             hasEnemy.Value = true;
             enemy.Value = colliders [0].gameObject;
         } else {
             hasEnemy.Value = false;
         }
     } else {
         hasEnemy.Value = false;
     }
 }
Exemple #23
0
        public override TaskStatus OnUpdate()
        {
            Vector3 position;
            Vector3 dir = direction.Value;
            if (originGameObject.Value != null) {
                position = originGameObject.Value.transform.position;
                if (space == Space.Self) {
                    dir = originGameObject.Value.transform.TransformDirection(direction.Value);
                }
            } else {
                position = originPosition.Value;
            }

            RaycastHit hit;
            if (Physics.Raycast(position, dir, out hit, distance.Value == -1 ? Mathf.Infinity : distance.Value, layerMask)) {
                storeHitObject = hit.collider.gameObject;
                storeHitPoint = hit.point;
                storeHitNormal = hit.normal;
                storeHitDistance = hit.distance;
                return TaskStatus.Success;
            }

            return TaskStatus.Failure;
        }
 // Reset the public variables
 public override void OnReset()
 {
     arriveDistance = 0.1f;
     waypoints      = null;
     randomPatrol   = false;
 }
Exemple #25
0
 // Reset the public variables
 public override void OnReset()
 {
     arriveDistance           = 0.1f;
     targetDistPrediction     = 20;
     targetDistPredictionMult = 20;
 }
 public override void OnReset()
 {
     this.firstVector2 = (this.secondVector2 = Vector2.zero);
     this.storeResult  = 0f;
 }
Exemple #27
0
 // Reset the public variables
 public override void OnReset()
 {
     arriveDistance = 0.1f;
 }
Exemple #28
0
 public override void OnReset()
 {
     vector2Variable = storeResult = Vector2.zero;
     maxLength       = 0;
 }
Exemple #29
0
 public override void OnReset()
 {
     floatVariable = 0;
 }
Exemple #30
0
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.storeValue       = 1f;
 }
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue       = 0;
 }
Exemple #32
0
 public override void OnReset()
 {
     base.OnReset();
     target       = null;
     moveDistance = 2;
 }
 public override void OnReset()
 {
     targetGameObject   = null;
     shadowSoftnessFade = 0;
 }
Exemple #34
0
 public virtual void OnReset()
 {
     this.targetGameObject = (SharedGameObject)null;
     this.maxDistance      = (SharedFloat)1f;
 }
Exemple #35
0
 public override void OnReset()
 {
     target             = null;
     thePosition        = Vector3.zero;
     distanceMultiplier = 2;
 }
Exemple #36
0
 public virtual void OnReset()
 {
     this.targetGameObject = (SharedGameObject)null;
     this.spread           = (SharedFloat)1f;
 }
Exemple #37
0
 public override void OnReset()
 {
     targetGameObject = null;
     angularSpeed     = 0;
 }
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.radius           = 0f;
 }
Exemple #39
0
 public virtual void OnReset()
 {
     this.fromQuaternion = this.toQuaternion = this.storeResult = (SharedQuaternion)Quaternion.get_identity();
     this.amount         = (SharedFloat)0.0f;
 }
 public virtual void OnReset()
 {
     this.targetGameObject = (SharedGameObject)null;
     this.storeResult      = (SharedFloat)0.0f;
 }
Exemple #41
0
 public override void OnReset()
 {
     storeResult = 0;
 }
Exemple #42
0
 public override void OnReset()
 {
     targetGameObject = null;
     volume           = 1;
 }
 public override void OnReset()
 {
     firstRotation = secondRotation = Quaternion.identity;
     storeResult   = 0;
 }
Exemple #44
0
 /// <summary>
 /// Reset the public variables back to their defaults.
 /// </summary>
 public override void OnReset()
 {
     targetGroup = null;
     targetTag   = "";
     waitTime    = 0;
 }
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.startSpeed       = 0f;
 }
Exemple #46
0
 public virtual void OnReset()
 {
     this.targetGameObject = (SharedGameObject)null;
     this.angularSpeed     = (SharedFloat)0.0f;
 }
Exemple #47
0
 public override void OnReset()
 {
     targetGameObject = null;
     storeResult = 0;
 }
Exemple #48
0
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.storeResult      = 0f;
 }
Exemple #49
0
 public override void OnReset()
 {
     axisName = "";
     multiplier = 1.0f;
     storeResult = 0;
 }
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue = 0;
 }
 public override void OnReset()
 {
     targetGameObject = null;
     mass             = 0;
 }
Exemple #52
0
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.pitch            = 1f;
 }
Exemple #53
0
 public override void OnReset()
 {
     fromQuaternion = toQuaternion = storeResult = Quaternion.identity;
     amount = 0;
 }
Exemple #54
0
 // Reset the public variables
 public override void OnReset()
 {
     wanderDistance = 20;
     wanderRate     = 2;
 }
Exemple #55
0
 public override void OnReset()
 {
     targetValue = 0;
     targetVariable = 0;
 }
Exemple #56
0
 public override void OnReset()
 {
     axisName    = "";
     multiplier  = 1.0f;
     storeResult = 0;
 }
Exemple #57
0
 public override void OnReset()
 {
     targetGameObject = null;
     range = 0;
 }
Exemple #58
0
 public override void OnReset()
 {
     targetGameObject = null;
     playbackSpeed    = 1;
 }
Exemple #59
0
 public override void OnReset()
 {
     targetGameObject = null;
     mass = 0;
 }
Exemple #60
0
 public override void OnReset()
 {
     targetGameObject = null;
     panLevel         = 1;
 }