Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     _playerTransform   = GetComponent <Transform>();
     _playerRigidbody2D = GetComponent <Rigidbody2D>();
     _weaponController  = GetComponent <WeaponController>();
     _hp              = GetComponent <Player_HP>();
     _source          = GetComponent <AudioSource>();
     _groundSource    = _groundCheckTransform.gameObject.GetComponent <AudioSource>();
     _soundDelayTimer = _soundDelay;
 }
Beispiel #2
0
 // 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>();
 }