Exemple #1
0
 private void Start()
 {
     _health           = GetComponent <PlayerHealth>();
     _throw            = GetComponent <ShurikenThrow>();
     _advCol           = GetComponent <AdvPlayerCollider>();
     _playerController = GetComponent <PlayerController>();
     _anim             = GetComponent <Animator>();
     _rb       = GetComponent <Rigidbody2D>();
     _renderer = GetComponent <SpriteRenderer>();
 }
Exemple #2
0
        private void Start()
        {
            _advCol = GetComponent <AdvPlayerCollider>();
            _rb     = GetComponent <Rigidbody2D>();
            _sounds = GetComponentInChildren <PlayerSound>();

            if (_sounds == null)
            {
                Debug.LogError("Error: PlayerSound.cs is missing on the " + gameObject.name + " gameObject.");
            }
        }
 private void OnEnable()
 {
     _playerCollider = (AdvPlayerCollider)target;
 }