Sword Example 2

9927
9928
18
19

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