// 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; }
public override void OnReset() { targetGameObject = null; point = Vector3.zero; axis = Vector3.zero; angle = 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"); }
// 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; }
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; }
public override void OnReset() { // Reset the public properties back to their original values waitTime = 1; randomWait = false; randomWaitMin = 1; randomWaitMax = 1; }
// Reset the public variables public override void OnReset() { base.OnReset(); randomPatrol = false; waypointPauseDuration = 0; waypoints = null; }
// 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; }
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; }
public override void OnReset() { originGameObject = null; originPosition = Vector3.zero; direction = Vector3.zero; distance = -1; layerMask = -1; space = Space.Self; }
// Reset the public variables public override void OnReset() { base.OnReset(); neighborDistance = 100; lookAheadDistance = 5; alignmentWeight = 0.4f; cohesionWeight = 0.5f; separationWeight = 0.6f; }
public override TaskStatus OnUpdate() { if (light == null) { Debug.LogWarning("Light is null"); return TaskStatus.Failure; } storeValue = light.shadowStrength; return TaskStatus.Success; }
// Reset the public variables public override void OnReset() { base.OnReset(); neighborDistance = 10; separationDistance = 2; maxQueueAheadDistance = 2; maxQueueRadius = 20; slowDownSpeed = 0.15f; }
// Reset the public variables public override void OnReset() { base.OnReset(); target = null; evadeDistance = 10; lookAheadDistance = 5; targetDistPrediction = 20; targetDistPredictionMult = 20; }
// Reset the public variables public override void OnReset() { base.OnStart(); maxCoverDistance = 1000; maxRaycasts = 100; rayStep = 1; coverOffset = 2; lookAtCoverPoint = false; rotationEpsilon = 0.5f; }
// 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; }
// 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; } }
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; }
// 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; }
// Reset the public variables public override void OnReset() { arriveDistance = 0.1f; }
public override void OnReset() { vector2Variable = storeResult = Vector2.zero; maxLength = 0; }
public override void OnReset() { floatVariable = 0; }
public override void OnReset() { this.targetGameObject = null; this.storeValue = 1f; }
public override void OnReset() { targetGameObject = null; storeValue = 0; }
public override void OnReset() { base.OnReset(); target = null; moveDistance = 2; }
public override void OnReset() { targetGameObject = null; shadowSoftnessFade = 0; }
public virtual void OnReset() { this.targetGameObject = (SharedGameObject)null; this.maxDistance = (SharedFloat)1f; }
public override void OnReset() { target = null; thePosition = Vector3.zero; distanceMultiplier = 2; }
public virtual void OnReset() { this.targetGameObject = (SharedGameObject)null; this.spread = (SharedFloat)1f; }
public override void OnReset() { targetGameObject = null; angularSpeed = 0; }
public override void OnReset() { this.targetGameObject = null; this.radius = 0f; }
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; }
public override void OnReset() { storeResult = 0; }
public override void OnReset() { targetGameObject = null; volume = 1; }
public override void OnReset() { firstRotation = secondRotation = Quaternion.identity; storeResult = 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; }
public virtual void OnReset() { this.targetGameObject = (SharedGameObject)null; this.angularSpeed = (SharedFloat)0.0f; }
public override void OnReset() { targetGameObject = null; storeResult = 0; }
public override void OnReset() { this.targetGameObject = null; this.storeResult = 0f; }
public override void OnReset() { axisName = ""; multiplier = 1.0f; storeResult = 0; }
public override void OnReset() { targetGameObject = null; mass = 0; }
public override void OnReset() { this.targetGameObject = null; this.pitch = 1f; }
public override void OnReset() { fromQuaternion = toQuaternion = storeResult = Quaternion.identity; amount = 0; }
// Reset the public variables public override void OnReset() { wanderDistance = 20; wanderRate = 2; }
public override void OnReset() { targetValue = 0; targetVariable = 0; }
public override void OnReset() { targetGameObject = null; range = 0; }
public override void OnReset() { targetGameObject = null; playbackSpeed = 1; }
public override void OnReset() { targetGameObject = null; panLevel = 1; }