mirror of
https://github.com/stevenhowes/TheEscape.git
synced 2026-05-27 00:03:25 +01:00
Player ship can be destroyed
This commit is contained in:
Binary file not shown.
@@ -28,6 +28,7 @@ DEF PROC_main
|
|||||||
PlayerVelocity%=0
|
PlayerVelocity%=0
|
||||||
PlayerShields%=100
|
PlayerShields%=100
|
||||||
PlayerStructuralIntegrity%=100
|
PlayerStructuralIntegrity%=100
|
||||||
|
PlayerSprite$ = "player_ship"
|
||||||
|
|
||||||
DIM PlayerHitbox%(3)
|
DIM PlayerHitbox%(3)
|
||||||
PlayerHitbox%() = 0,0,60,81
|
PlayerHitbox%() = 0,0,60,81
|
||||||
@@ -101,6 +102,7 @@ DEF PROC_main
|
|||||||
REM PROCenemy_ship_collide_npc
|
REM PROCenemy_ship_collide_npc
|
||||||
PROCplayer_arc_calculatetarget
|
PROCplayer_arc_calculatetarget
|
||||||
PROCenemy_ship_handle_damage
|
PROCenemy_ship_handle_damage
|
||||||
|
PROCplayer_ship_handle_damage
|
||||||
|
|
||||||
REM Still not sure about this bollocks, but it does seem to work now
|
REM Still not sure about this bollocks, but it does seem to work now
|
||||||
SYS "OS_Byte",19
|
SYS "OS_Byte",19
|
||||||
@@ -132,6 +134,12 @@ DEF PROC_main
|
|||||||
|
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|
||||||
|
DEF PROCplayer_ship_handle_damage
|
||||||
|
IF PlayerStructuralIntegrity% <= 0 THEN
|
||||||
|
PlayerSprite$ = "explode_shp1"
|
||||||
|
ENDIF
|
||||||
|
ENDPROC
|
||||||
|
|
||||||
DEF PROCenemy_ship_handle_damage
|
DEF PROCenemy_ship_handle_damage
|
||||||
FOR Enemy%=0 TO MaxEnemies% - 1
|
FOR Enemy%=0 TO MaxEnemies% - 1
|
||||||
IF EnemyHealth%(Enemy%) <= 0 THEN
|
IF EnemyHealth%(Enemy%) <= 0 THEN
|
||||||
@@ -290,7 +298,7 @@ REM Draw player ship
|
|||||||
DEF PROCplayer_ship_draw
|
DEF PROCplayer_ship_draw
|
||||||
REM If using l/r sprites we debounce to stop it looking twitchy
|
REM If using l/r sprites we debounce to stop it looking twitchy
|
||||||
IF Cents% > ResetShipSprite% THEN
|
IF Cents% > ResetShipSprite% THEN
|
||||||
ShipSprite$ = "player_ship"
|
ShipSprite$ = PlayerSprite$
|
||||||
ENDIF
|
ENDIF
|
||||||
PROCdraw_sprite(ShipSprite$,PlayerLocation%(0),PlayerLocation%(1))
|
PROCdraw_sprite(ShipSprite$,PlayerLocation%(0),PlayerLocation%(1))
|
||||||
ENDPROC
|
ENDPROC
|
||||||
|
|||||||
Reference in New Issue
Block a user