void Start() { riderCombat = GetComponentInChildren <RiderCombat>(); animalAIControl = GetComponentInChildren <MAnimalAIControl>(); mAnimal = GetComponentInChildren <MAnimal>(); rider = GetComponentInChildren <MRider>(); //animalAIControl.enabled = false; // SetClosestWaypoint(); }
[HideInInspector] public float[] DecisionsTime;// { get; set; } #endregion void Awake() { if (AIMovement == null) { AIMovement = Animal.FindComponent <MAnimalAIControl>(); } var AnimalStatscomponent = Animal.FindComponent <Stats>(); if (AnimalStatscomponent) { AnimalStats = AnimalStatscomponent.stats_D; } AgentHeight = transform.lossyScale.y * AIMovement.Agent.height; }
void Reset() { remainInState = MTools.GetInstance <MAIState>("Remain in State"); AIMovement = this.FindComponent <MAnimalAIControl>(); if (AIMovement) { //AIMovement.AutoInteract = false; AIMovement.AutoNextTarget = false; AIMovement.UpdateTargetPosition = false; AIMovement.MoveAgentOnMovingTarget = false; AIMovement.LookAtTargetOnArrival = false; if (Animal) { Animal.isPlayer.Value = false; //Make sure this animal is not the Main Player } } else { Debug.LogWarning("There's AI Control in this GameObject"); } }