13 lines
273 B
Plaintext
13 lines
273 B
Plaintext
|
/// @description Insert description here
|
||
|
// You can write your code in this editor
|
||
|
|
||
|
//TODO: move the enemy somewhere `other`
|
||
|
|
||
|
// If not invivcible, set iframes count, then do damage.
|
||
|
if iframes == 0 {
|
||
|
iframes = 20;
|
||
|
hp -= other.damage;
|
||
|
if hp < 0 {
|
||
|
game_restart();
|
||
|
}
|
||
|
}
|