// Start is called before the first frame update void Start() { // Inicialization of variables _shake = GameObject.Find("MainCamera").GetComponent <Shake>(); _soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>(); Ui_Manager = GameObject.Find("Canvas").GetComponent <Ui_Manager>(); _player = GameObject.FindGameObjectWithTag("Player").transform; Attack(); levelDown(); }
// Start is called before the first frame update void Start() { // Variables initialization _shake = GameObject.Find("MainCamera").GetComponent <Shake>(); _soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>(); _player = GameObject.FindGameObjectWithTag("Player").transform; Ui_Manager = GameObject.Find("Canvas").GetComponent <Ui_Manager>(); last_position = transform.position; setChanceAndPath(); }
// Start is called before the first frame update void Start() { _shake = GameObject.Find("MainCamera").GetComponent <Shake>(); _soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>(); _gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); _UImanager = GameObject.Find("Canvas").GetComponent <Ui_Manager>(); if (_UImanager != null) { _UImanager.UpdateHealth(_healthPoints); } btnFire = GameObject.FindGameObjectWithTag("Button").GetComponent <Button>(); joystick = GameObject.FindGameObjectWithTag("Joystick").GetComponent <VariableJoystick>(); _shieldPrefab = Instantiate(_shieldPrefab, transform.position, Quaternion.identity); _shieldPrefab.transform.parent = transform; _shieldPrefab.SetActive(false); joystick.enabled = true; }
private void Awake() { instance = this; scene = GetComponent <Scene_Manager>(); ui = GetComponent <Ui_Manager>(); }
// Start is called before the first frame update void Start() { _shake = GameObject.Find("MainCamera").GetComponent <Shake>(); _soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>(); Ui_Manager = GameObject.Find("Canvas").GetComponent <Ui_Manager>(); }
// Start is called before the first frame update void Start() { // Initialization of variables btnScreen = GameObject.Find("StartScreen").GetComponent <Button>(); _UImanager = GameObject.Find("Canvas").GetComponent <Ui_Manager>(); }