//------------------------------------------------ bool permettant de check si une point est disponible void Start() { aB = player.GetComponent <AvatarBehavior> (); agent = GetComponent <NavMeshAgent> (); state = States.playerUndetected; searchingNewPoint = true; }
/// <summary> /// Starts the behavior. /// </summary> /// <returns>The behavior.</returns> IEnumerator StartBehavior() { gameManager = GameObject.Find("GameManager"); gM = gameManager.GetComponent <GameManager> (); player = gM.spawnedPlayer; aB = player.GetComponent <AvatarBehavior>(); agent = GetComponent <NavMeshAgent>(); Debug.Log("worked"); yield break; }
// Use this for initialization protected override void Start() { base.Start(); //Assign the behavior this.Behavior = this.GetComponent <AvatarBehavior>(); //Add root scene object for the avatar this.gameObject.AddComponent <MMISceneObject>(); //Add the scene objects of the bones (if desired) if (this.AddBoneSceneObjects) { //Setup the scene objects of the bones foreach (Transform transform in this.Joints) { MMISceneObject s = transform.gameObject.AddComponent <MMISceneObject>(); s.ShowCoordinateSystem = false; } } }
void Start() { rB = GetComponent <Rigidbody> (); aB = GetComponent <AvatarBehavior> (); }