Exemplo n.º 1
0
        private void Awake()
        {
            _rigidbody     = GetComponent <Rigidbody2D>();
            _healthAbility = GetComponent <HealthAbility>();
            _collider      = GetComponent <CapsuleCollider2D>();

            _healthAbility.OnDied += Death;
        }
 private void Awake()
 {
     _audioSource = GetComponent <AudioSource>();
     Assert.IsNotNull(_audioSource);
     _healthAbility = GetComponent <HealthAbility>();
     Assert.IsNotNull(_healthAbility);
     _healthAbility.OnDied += Play;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     _healthAbility         = GetComponent <HealthAbility>();
     _healthAbility.OnDied += Split;
 }
Exemplo n.º 4
0
 private void Awake()
 {
     _spriteRenderer = model.GetComponent <SpriteRenderer>();
     _healthAbility  = GetComponent <HealthAbility>();
 }