// Use this for initialization void Start() { tree = GetComponent <BehaviorTree> (); hasEnemy = (SharedBool)tree.GetVariable("hasEnemy"); enemy = (SharedGameObject)tree.GetVariable("enemy"); hp = (SharedFloat)tree.GetVariable("hp"); }
public override void OnStart() { GetComponent<Animator> ().Play ("hurt"); animator = GetComponent<Animator> (); tree = GetComponent<BehaviorTree> (); hurted = (SharedBool)tree.GetVariable ("hurted"); }
public virtual void OnReset() { this.speed = (SharedFloat)10f; this.angularSpeed = (SharedFloat)120f; this.arriveDistance = (SharedFloat)1f; this.stopOnTaskEnd = (SharedBool)true; }
public override void OnReset() { target = null; rotationDampening = 10; rotateWeapon = true; aimThreshold = 0.4f; }
public override void OnReset() { // Reset the public properties back to their original values successProbability = 0.5f; seed = 0; useSeed = false; }
public override void OnReset() { to = 0; time = 0; snap = false; storeTweener = null; }
/// <summary> /// Resets the objects back to their default values. /// </summary> public override void OnReset() { m_TargetGameObject = null; m_EffectType = string.Empty; m_Start = true; m_AlwaysReturnSuccess = true; }
public override void OnReset() { // Reset the public properties back to their original values maxTaskAccessCount = null; linkedTaskGuards = null; waitUntilTaskAvailable = true; }
public override void OnReset() { // Reset the properties back to their original values behaviorGameObject = null; group = 0; pauseBehavior = false; }
// Reset the public variables public override void OnReset() { base.OnReset(); randomPatrol = false; waypointPauseDuration = 0; waypoints = null; }
public override void OnReset() { base.OnReset(); separation = new Vector2(2, 2); fill = false; }
public override void OnReset() { this.waitTime = 1f; this.randomWait = false; this.randomWaitMin = 1f; this.randomWaitMax = 1f; }
public override void OnReset() { base.OnReset(); this.randomPatrol = (SharedBool)false; this.waypointPauseDuration = (SharedFloat)0.0f; this.waypoints = (SharedGameObjectList)null; }
public override TaskStatus OnUpdate() { //Debug.Log("transform.localEulerAngles.y:" + transform.localEulerAngles.y); if (transform.position.z < doorZ)//房间A { if (transform.position.x <= (waitLine + 5)) { isAEmpty = (SharedBool)GlobalVariables.Instance.GetVariable("isRoomAEmpty"); if (isAEmpty.Value) { return(TaskStatus.Failure); } else { if (transform.position.x > doorX) { if (transform.localEulerAngles.y < 180)//出门 { Debug.Log("出门"); return(TaskStatus.Failure); } else { Debug.Log("等待"); return(TaskStatus.Success); } } } } } else//房间B { if (transform.position.x <= (waitLine + 5)) { isBEmpty = (SharedBool)GlobalVariables.Instance.GetVariable("isRoomBEmpty"); if (isBEmpty.Value) { return(TaskStatus.Failure); } else { if (transform.position.x > doorX) { if (transform.localEulerAngles.y < 180)//出门 { Debug.Log("出门"); return(TaskStatus.Failure); } else { Debug.Log("等待"); return(TaskStatus.Success); } } } } } return(TaskStatus.Failure); }
// Use this for initialization void Start() { tree = GetComponent<BehaviorTree> (); hasEnemy = (SharedBool)tree.GetVariable ("hasEnemy"); enemy = (SharedGameObject)tree.GetVariable ("enemy"); hp = (SharedFloat)tree.GetVariable ("hp"); }
public override void OnStart() { GetComponent <Animator> ().Play("hurt"); animator = GetComponent <Animator> (); tree = GetComponent <BehaviorTree> (); hurted = (SharedBool)tree.GetVariable("hurted"); }
public virtual void OnReset() { this.behaviorGameObject = (SharedGameObject)null; this.group = (SharedInt)0; this.waitForCompletion = (SharedBool)false; this.synchronizeVariables = (SharedBool)false; }
public virtual void OnReset() { this.waitTime = (SharedFloat)1f; this.randomWait = (SharedBool)false; this.randomWaitMin = (SharedFloat)1f; this.randomWaitMax = (SharedFloat)1f; }
public override void OnReset() { // Reset the properties back to their original values text = ""; logError = false; logTime = false; }
public override void OnReset() { // Reset the properties back to their original values. behaviorGameObject = null; group = 0; waitForCompletion = false; }
/// <summary> /// Reset the values back to their defaults. /// </summary> public override void OnReset() { speed = 10; angularSpeed = 120; arriveDistance = 1; stopOnTaskEnd = true; }
public override void OnReset() { this.behaviorGameObject = null; this.group = 0; this.waitForCompletion = false; this.synchronizeVariables = false; }
public override void OnReset() { base.OnReset(); radius = 5; concave = true; }
public override void OnReset() { if (specifiedObject != null) { specifiedObject.Value = null; } enabled = false; }
public override void OnReset() { base.OnReset(); separation = new Vector2(2, 2); backPositionOffset = false; }
protected override void OnReset() { duration = 1; randomWait = false; randomWaitMin = 1; randomWaitMax = 1; }
public override void OnReset() { base.OnReset(); separation = 2; right = false; }
/// <summary> /// Resets the objects back to their default values. /// </summary> public override void OnReset() { m_TargetGameObject = null; m_AbilityType = string.Empty; m_PriorityIndex = -1; m_Start = true; m_AlwaysReturnSuccess = false; }
public override void OnReset() { firstObject = null; secondObject = null; threshold = 2; isAbove = null; difference = null; }
public override void OnReset() { // Reset the public properties back to their original values waitTime = 1; randomWait = false; randomWaitMin = 1; randomWaitMax = 1; }
public override void OnReset() { targetGameObject = null; targetObject = null; targetPosition = Vector3.zero; ignoreHeight = true; storeValue = 0; }
public override void OnReset() { if (this.specifiedObject != null) { this.specifiedObject.Value = null; } this.enabled = false; }
public override void OnReset() { thisGameObject = null; targetObject = null; targetPosition = Vector3.zero; ignoreHeight = true; storeValue = 0; }
public override void OnReset() { start = Vector3.zero; end = Vector3.zero; color = Color.white; duration = 0f; depthTest = true; }
// 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() { // Reset the properties back to their original values textFormat = string.Empty; logError = false; arg0 = null; arg1 = null; arg2 = null; arg3 = null; }
public override TaskStatus OnUpdate() { isAttacked = (SharedBool)GlobalVariables.Instance.GetVariable("IsAttacked"); if (isAttacked.Value) { return TaskStatus.Success; } return TaskStatus.Failure; }
// 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; }
public override void OnReset() { targetGameObject = null; mute = false; }
public override void OnReset() { targetValue = false; targetVariable = false; }
public override void OnReset() { show = false; window = null; }
public override void OnReset() { // Reset the properties back to their original values text = ""; logError = false; }
public override void OnReset() { variable = false; compareTo = false; }
public override void OnReset() { // Reset the public properties back to their original values. count = 0; endOnFailure = true; }
public override void OnReset() { key = KeyCode.None; storeResult = false; }
public override void OnReset() { targetGameObject = null; storeValue = false; }
public override void OnReset() { blueprintID = 0; learned = false; }
// Reset the public variables public override void OnReset() { base.OnReset(); maxCoverDistance = 1000; maxRaycasts = 100; rayStep = 1; coverOffset = 2; lookAtCoverPoint = false; rotationEpsilon = 0.5f; }
public override void OnReset() { targetGameObject = null; fixedAngle = false; }
public override void OnReset() { buttonName = "Fire1"; storeResult = false; }
public override void OnReset() { targetGameObject = null; rootMotion = false; }
public override void OnReset() { targetGameObject = null; ignoreListenerPause = false; }
public override void OnReset() { // Reset the properties back to their original values. interruptTasks = null; interruptSuccess = false; }