Ejemplo n.º 1
0
 private void CacheComponents()
 {
     _mover              = GetComponent <Mover>();
     _health             = GetComponent <Health>();
     _damage             = GetComponent <Damage>();
     _flipPlayer         = GetComponent <FlipObj>();
     _onReachedEdge      = GetComponent <OnReachedEdge>();
     _spriteRenderer     = GetComponentInChildren <SpriteRenderer>();
     _characterAnimation = GetComponent <CharacterAnimation>();
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     _mover = GetComponent <Mover>();
     _characterAnimation = GetComponent <CharacterAnimation>();
     _health             = GetComponent <Health>();
     _flip          = GetComponent <Flip>();
     _onReachedEdge = GetComponent <OnReachedEdge>();
     _damage        = GetComponent <Damage>();
     _direction     = 1f;
 }