Esempio n. 1
0
 void Start()
 {
     _stageManager  = FindObjectOfType <StageManager>().GetComponent <StageManager>();
     _playerCentral = gameObject.GetComponent <PlayerCentral>();
     if (_textUI)
     {
         _textUIHealth = _textUI.GetComponent <TextMeshProUGUI>();
     }
 }
Esempio n. 2
0
    void Start()
    {
        _inputManager  = FindObjectOfType <InputManager>().GetComponent <InputManager>();
        _rb            = gameObject.GetComponent <Rigidbody>();
        _playerCentral = gameObject.GetComponent <PlayerCentral>();

        if (!_inputManager)
        {
            Debug.LogError("No InputManager found in the scene!");
        }
        if (!_rb)
        {
            Debug.LogError("No RigidBody in the object!");
        }
    }