private void Start()
 {
     hasHit = false;
     playerExperienceManager = FindObjectOfType <PlayerExperienceManager>();
     prevLoc       = transform.position;
     startPosition = transform.position;
 }
 private void Start()
 {
     playerStaminaManager    = GetComponent <PlayerStaminaManager>();
     playerAnimationsManager = GetComponent <PlayerAnimationsManager>();
     playerMovementManager   = GetComponent <PlayerMovementManager>();
     playerExperienceManager = GetComponent <PlayerExperienceManager>();
     playerHealthManager     = GetComponent <PlayerHealthManager>();
     audioManager            = FindObjectOfType <AudioManager>();
 }
 // For the singleton
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Example #4
0
 public void SetExperienceManager(PlayerExperienceManager manager)
 {
     playerExperienceManager = manager;
     manager.OnLevelUp      += HandleLevelUp;
 }