private void Start() { _player = new Player(16, 16); _heartContainer = new HeartContainer( _images.Select(image => new Heart(image)).ToList()); _player.Healed += (sender, args) => { _heartContainer.Replenish(args.Amount); }; _player.Damaged += (sender, args) => { _heartContainer.Deplete(args.Amount); }; }
public void BeforeTests() { _image_last = An.Image(); _image_last.fillAmount = 0f; _image_first = An.Image(); _image_first.fillAmount = 0f; _heartContainer = new HeartContainer(new List <Heart> { A.Heart().With(_image_first), A.Heart().With(_image_last), }); }