Sword Example 2

9843
9844
17
18

Directions

Arrow keys to move, space bar to swing sword.

How it Works

The sword logic is pretty simple - An object (named Strike) is emitted in the forward direction with a very short lifetime when the attack button is pressed. The enemy objects check for collisions with the Strike object.

Credits Sprites from Open Game Art

Editor