Collided enemies richochet

This commit is contained in:
stevenhowes
2021-02-05 21:30:12 +00:00
parent 597a5ad5ea
commit 10ca133bdd
3 changed files with 7 additions and 2 deletions
Binary file not shown.
+7 -2
View File
@@ -133,6 +133,11 @@ DEF PROC_main
ENDPROC
DEF PROCenemy_ship_handle_damage
FOR Enemy%=0 TO MaxEnemies% - 1
IF EnemyHealth%(Enemy%) <= 0 THEN
EnemySprites$(Enemy%) = "explode_shp1"
ENDIF
NEXT Enemy%
ENDPROC
DEF PROCrespawn_enemy(Enemy%)
@@ -253,8 +258,8 @@ DEF PROCenemy_ship_collide_player
EnemyHealth%(Enemy%) = EnemyHealth%(Enemy%) - 30
PlayerStructuralIntegrity% = PlayerStructuralIntegrity% - EnemyCollideForce%(Enemy%)
EnemyCollidable%(Enemy%) = 0
EnemyVelocity%(Enemy%,X) = 0
EnemyVelocity%(Enemy%,Y) = 0
EnemyVelocity%(Enemy%,Y) = EnemyVelocity%(Enemy%,Y) / 2
EnemyVelocity%(Enemy%,X) = EnemyVelocity%(Enemy%,X) * 4
ENDIF
ENDIF
NEXT Enemy%
Binary file not shown.