Clara
❔ Filling sprites
I am currently working on a 2d platformer game in visual studio, using c# that is then displayed on a xaml window. I have recently added an item that increases the size of the player character. After consuming the item, the "hitbox" of the player character increases, which I noticed. because I started running into things that I didn't before, so at some level it must have worked. However, the sprite I'm using to show the player character doesn't grow to match the new rectangle it is supposed to fill. Does anybody know how I can make a sprite "refill" a rectangle?
2 replies
❔ Removing items from a XAML window
I'm working on a small video game that I'm visualising with WPF.
The issue I have is that I can't quite figure out how to remove an entity from the window. For example, I have a little wizard, who shoots fireballs and I'd like those fireballs to disappear when the hit something. hasn't really been doing the trick. I've tested a few things and can confirm that the fireballs are aware they've hit something (they deal damage to the enemies' healthbars), but I can't get rid of them. Or the enemies when they drop to 0hp, for that matter. Any clues you might be able to give me would be very much appreciated.
2 replies