// Use this for initialization void Awake() { _instance = this; _animator = GetComponent <Animator>(); _movement = GetComponent <Player_Movement>(); _input = GetComponent <Player_InputController>(); _hp = _OriginalHP; _transform = GetComponent <Transform>(); _cameraFollow = FindObjectOfType <Player_CameraFollow>(); _hpBar = FindObjectOfType <HPBarController>(); _hammer = GetComponent <Weapon_Hammer>(); }
private void SetWeapons() { _sword = GetComponent <Weapon_Sword>(); _hammer = GetComponent <Weapon_Hammer>(); string tmp = Application.loadedLevelName; if (tmp.Equals("level1") || tmp.Equals("Level2") || tmp.Equals("Level3")) { _hammerInGame = false; } else { _hammerInGame = true; } }
// Use this for initialization void Start() { _hammer = FindObjectOfType <Weapon_Hammer>(); _playerMovement = GetComponent <Player_Movement>(); }
// Use this for initialization void Awake() { _hammer = FindObjectOfType <Weapon_Hammer>(); _source = gameObject.AddComponent <AudioSource>(); _source.playOnAwake = false; }