private void Start() { _rigidbody = GetComponent <Rigidbody2D>(); _livingComponent = GetComponent <LivingComponent>(); _target = GetTarget(_goal.position); _livingComponent.onDamage += UpdateUI; }
public Player(Vector2 pos, char symbol, Color4 color, int health = 10) : base(pos, symbol, color) { LivingComponent = new LivingComponent(health); }