void Start() { _ia = GetComponent <IABehaviour>(); if (!_ia) { throw new Exception("Tipito null"); } _ent = GetComponent <Entity>(); if (!_ent) { throw new Exception("Entity null"); } StartPlan(); }
private void ChangePhase(IABehaviour _Behaviour) { switch (_Behaviour) { case IABehaviour.RANDOM: FindRandomDestination(); break; } if (_Behaviour == IABehaviour.FOLLOWING_TRANSFORM) { SetBraking(c_FastLerpFactor, 2f); } else { SetBraking(c_NormalLerpFactor, 0f); } ChangeMoveStatus(true); m_Behaviour = _Behaviour; }