The game is almost complete. There are just a few final adjustments to be made for all the sprites to interact properly.
Let's first solve the issue where the enemies don't respond to being hit by the sword or the arrow. What we are lacking is a collision check for these items. This can be easily fixed by the following steps:
That fixes our collision problem, but not all the problems. As you may have noticed, the cat isn't actually harmed when touched by either one of the enemies. That's rather unfair, so let's change that as well.
That's more fair now that the cat will be reset and lose points by anything bad happening to it.
While we're reviewing the points system, let's add to that as well. The cat loses points when touched by an enemy. So it should also gain points on hitting an enemy.
Now to prevent the players from uncontrollably pressing the weapon buttons, let's deduct points again for using a weapon. That way, there is a limit to how many times the weapons can be used. It will encourage the player to make a deliberate choice and not get into a mad killing frenzy.
As a final step, we will also reset the items for each new level played. So at each level the player has to collect the items before he/she can use them.
Test the game and see how many levels you can clear before getting defeated.
We cleaned up the game and tied all the loose ends together. You'll often find that while developing games, you will try and add new features piece by piece. This often requires some rethinking and later adjustments to the parts of the game that we have already (thought were) finished.
Therefore, it's a good idea to keep the way you write games clear and consistent. Set variables at the start of a script. It's even better if you can collect them in the Stage object. Using functions also helps to separate different pieces of functionality.
3.145.40.189