public override void OnReset() { base.OnReset(); this.randomPatrol = (SharedBool)false; this.waypointPauseDuration = (SharedFloat)0.0f; this.waypoints = (SharedGameObjectList)null; }
public override void OnReset() { scanOrigin = null; scanRange = null; objectLayerMask = -1; listToStoreHitObject = null; }
// Reset the public variables public override void OnReset() { base.OnReset(); randomPatrol = false; waypointPauseDuration = 0; waypoints = null; }
public override void OnReset() { // Reset the properties back to their original values eventName = ""; storedGameObjectList = null; }
public override void OnReset() { storedGameObjectList = null; distanceFrom = Vector3.zero; closestGameObject = null; closestIndex = null; positionToTest = Vector3.zero; distanceFromGO = null; distance = null; }
public override void OnStart() { sqrMagnitude = magnitude.Value * magnitude.Value; if (targetTag.Value == "Player") { objects = Players; } else if (targetTag.Value == "Enemy") { objects = Enemys; } }
private void InitWaypoints() { // initialize waypoints based on waypoints parent List <GameObject> mywpts = new List <GameObject> (); for (int i = 0; i < waypointsparent.Value.transform.childCount; i++) { mywpts.Add(waypointsparent.Value.transform.GetChild(i).gameObject); } waypoints = (SharedGameObjectList)mywpts; }
public override void OnStart() { base.OnStart(); animator = GetComponent <Animator>(); MoveHashId = Animator.StringToHash("Walk"); animator.SetBool(MoveHashId, true); #region 设置路径 GameObject obj = GameObject.FindWithTag("Pos"); if (obj == null) { if (gameObject.name == "Hunter_YELLOW(Clone)") { obj = Resources.Load("Prefabs/YellowPoslist") as GameObject; } else { obj = Resources.Load("Prefabs/GreenPoslist") as GameObject; } GameObject ob = GameObject.Instantiate(obj); Transform[] trans = ob.transform.GetComponentsInChildren <Transform>(); List <GameObject> objList = new List <GameObject>(); for (int i = 1; i < trans.Length; ++i) { objList.Add(trans[i].gameObject); } waypoints = objList; } #endregion // initially move towards the closest waypoint float distance = Mathf.Infinity; float localDistance; for (int i = 0; i < waypoints.Value.Count; ++i) { if ((localDistance = Vector3.Magnitude(transform.position - waypoints.Value[i].transform.position)) < distance) { distance = localDistance; waypointIndex = i; } } waypointReachedTime = -1; SetDestination(Target()); }
private void RandomMovetoTarget() { if (GameResMgr.IsSingletonDestory) { return; } m_CurrentTarget = RandomTraget(m_CurrentTarget); if (m_CurrentTarget != null) { SharedGameObject sgoPlayer = m_Player.gameObject; m_MamaBT.SetVariable("SeePlayerObj", sgoPlayer); SharedGameObject sgo = m_CurrentTarget.gameObject; m_MamaBT.SetVariable("MoveTo", sgo); SharedFloat sf = Mathf.Sign(m_CurrentTarget.position.x - transform.position.x) * 90; m_MamaBT.SetVariable("AngleOff2D", sf); List <GameObject> canSeeObjs = new List <GameObject>(); canSeeObjs.Add(GameResMgr.Instance.m_LayerRes[m_InitLayer].m_Door.gameObject); SharedGameObjectList sgl = canSeeObjs; m_MamaBT.SetVariable("SeeObjs", sgl); TryFlipSR(m_CurrentTarget); } }
public override void OnReset() { gameObjects = null; storedGameObjectList = null; }
public override void OnReset() { m_SensorSource = null; m_targets = null; }
public override void OnReset() { storedGameObjectList = null; maxCount = null; }
public override void OnReset() { this.variable = null; this.compareTo = null; }
public virtual void OnReset() { this.variable = (SharedGameObjectList)null; this.compareTo = (SharedGameObjectList)null; }
/// <summary> /// Reset the public variables back to their defaults. /// </summary> public override void OnReset() { targetGroup = null; targetTag = ""; waitTime = 0; }
public override void OnReset() { variable = null; compareTo = null; }
public virtual void OnReset() { this.targetValue = (SharedGameObjectList)null; this.targetVariable = (SharedGameObjectList)null; }
public override void OnReset() { theList = null; index = null; returnedObject = null; }
public override void OnReset() { m_gameObjectList = null; m_ReturnedObject = null; }
public override void OnReset() { GO = null; storedVGOList = null; }
public virtual void OnReset() { this.gameObjects = (SharedGameObject[])null; this.storedGameObjectList = (SharedGameObjectList)null; }
public override void OnReset() { this.gameObjects = null; this.storedGameObjectList = null; }
public override void OnReset() { targetValue = null; targetVariable = null; }
public override void OnReset() { m_SensorSource = null; m_TargetFilter = null; m_targetsDetected = null; }
public override void OnReset() { m_selfObject = null; m_storeTargetTransforms = null; m_targetObject = null; }
public override void OnReset() { storedList = null; }