Sword Example 2

9374
9375
16
17

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