ui environment changes, fix multiple inits
This commit is contained in:
@@ -24,6 +24,7 @@ public abstract class BaseCharacter : MonoBehaviour
|
||||
{
|
||||
_animator = GetComponentInChildren<Animator>();
|
||||
_characterDescriptor = GetComponentInChildren<CharacterDescriptor>();
|
||||
if (_characterDescriptor == null) throw new Exception("Character descriptor not found");
|
||||
_characterSex = _characterDescriptor.Sex;
|
||||
SetPlayerAnimation(AnimationStates.Walking);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ public class CharacterDescriptor : MonoBehaviour
|
||||
|
||||
private void OnAnimatorMove()
|
||||
{
|
||||
transform.parent.position = _navMeshAgent.nextPosition;
|
||||
if (_navMeshAgent != null)
|
||||
{
|
||||
transform.parent.position = _navMeshAgent.nextPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{
|
||||
Task = task;
|
||||
TagretObject = gameObject;
|
||||
Status = TaskStatus.Waiting;
|
||||
Status = TaskStatus.None;
|
||||
}
|
||||
|
||||
public void UpdateStatus(TaskStatus status)
|
||||
|
||||
Reference in New Issue
Block a user