private void Awake()
 {
     _playerController   = FindObjectOfType <PlayerController>();
     _playerEnergy       = FindObjectOfType <PlayerEnergy>();
     _playerEnergyPoints = FindObjectOfType <PlayerEnergyPoints>();
     _uiManager          = FindObjectOfType <UIManager>();
 }
Beispiel #2
0
    private void Awake()
    {
        //filename = chosen file name from GameTracker class.
        gameTracker = FindObjectOfType <GameTracker>();

        if (gameTracker)
        {
            fileName = gameTracker.ChosenFileName;
        }
        else
        {
            fileName = "DemonHunterSave1.Json";
        }

        filePath = Application.persistentDataPath + "/" + fileName;

        _playerController      = FindObjectOfType <PlayerController>();
        _playerCamera          = FindObjectOfType <PlayerCamera>();
        _tutorialManager       = FindObjectOfType <TutorialManager>();
        _playerEnergyPoints    = FindObjectOfType <PlayerEnergyPoints>();
        _playerMeleeAttack     = FindObjectOfType <PlayerMeleeAttack>();
        _playerShoot           = FindObjectOfType <PlayerShoot>();
        _playerDash            = FindObjectOfType <PlayerDash>();
        _playerEnergy          = FindObjectOfType <PlayerEnergy>();
        _gameManager           = FindObjectOfType <GameManager>();
        _playerUpgradesManager = FindObjectOfType <PlayerUpgradesManager>();
        _npcManager            = FindObjectOfType <NPCManager>();
    }
Beispiel #3
0
 private void Awake()
 {
     playerMeleeAttack = FindObjectOfType <PlayerMeleeAttack>();
     //playerShoot = FindObjectOfType<PlayerShoot>();
     //playerDash = FindObjectOfType<PlayerDash>();
     playerHealthComponenent = GameObject.Find("PlayerController").GetComponent <HealthComponent>();
     playerEnergy            = FindObjectOfType <PlayerEnergy>();
     playerEnergyPoints      = FindObjectOfType <PlayerEnergyPoints>();
     playerUpgradesManager   = FindObjectOfType <PlayerUpgradesManager>();
     gameManager             = FindObjectOfType <GameManager>();
 }
 private void Awake()
 {
     _jsonDataManager = FindObjectOfType <JsonDataManager>();
     _gameManager     = FindObjectOfType <GameManager>();
     playerHealthComp = GetComponent <HealthComponent>();
     _playerEnergy    = GetComponent <PlayerEnergy>();
     _playerInput     = GetComponent <PlayerInput>();
     _rb                 = GetComponent <Rigidbody2D>();
     _animator           = GetComponentInChildren <Animator>();
     _uiManager          = GameObject.Find("UIManager").GetComponent <UIManager>();
     _playerCamera       = GameObject.Find("CameraHolder").GetComponent <PlayerCamera>();
     _playerEnergyPoints = FindObjectOfType <PlayerEnergyPoints>();
 }
 private void Awake()
 {
     _rb                 = GetComponent <Rigidbody2D>();
     _uiManager          = GameObject.Find("UIManager").GetComponent <UIManager>();
     _playerEnergyPoints = FindObjectOfType <PlayerEnergyPoints>();
 }