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