From 6f5a1164f31d4e5594f5a6ce8de328f3b0608fd8 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 3 Jun 2006 10:52:37 +0000 Subject: Initial completed version --- missile_lock.bmx | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'missile_lock.bmx') diff --git a/missile_lock.bmx b/missile_lock.bmx index b2b7bea..0bcd87e 100644 --- a/missile_lock.bmx +++ b/missile_lock.bmx @@ -36,6 +36,7 @@ Import "gametypes.bmx" 'Import "game.bmx" Import "particle.bmx" 'Import "help.bmx" +Import "sound.bmx" ' =================================== ' Initialise @@ -63,6 +64,7 @@ SetAlpha(1.0) ' =================================== ' GFX.Init() ' MUST be first +SFX.Init() GameConfig.Load() Scroller.Init() @@ -82,6 +84,8 @@ Global quit:Int=False ' Menu() +FlushKeys() + While Not quit GameState.Reset() 'GameState.SetLevel(10) @@ -90,8 +94,20 @@ While Not quit While Not GameState.game_over + Local alert_timer:Int=200 + + SFX.Alert() + While Not GameState.game_over And Not MissileSet.AllDestroyed() Cls() + + If alert_timer + alert_timer:-1 + If alert_timer Mod 60 < 30 + GFX.font.Centre("RED ALERT!",300,255,0,0) + EndIf + EndIf + ResetCollisions() Backdrop.Draw() @@ -151,11 +167,23 @@ While Not quit Local bonus=100*GameState.level Local added:Int=0 Local timer:Int=Max(HERTZ*5,bonus/10+HERTZ*3) + Local bt:Int=0 + + If GameState.gonads + GameState.AddScore(9999+(GameState.level-1)*10000) + EndIf If Not GameState.hit GameState.AddScore(500*GameState.level) EndIf + If GameState.bonus_timer + bonus:+GameState.bonus_timer + bt=GameState.bonus_timer + EndIf + + GameState.bonus_timer=0 + While timer And Not KeyHit(KEY_ESCAPE) Cls() ResetCollisions() @@ -184,8 +212,20 @@ While Not quit GFX.font.Centre("BONUS " + Number.Format(added) + "!!!",400,255,255,0) + If bt + GFX.font.Centre("TIMER BONUS " + bt + "!!!",420,255,255,0) + EndIf + + Local y:Int=440 + If Not GameState.hit - GFX.font.Centre("PERFECT BONUS " + (500*GameState.level) + "!!!",420,255,255,0) + GFX.font.Centre("PERFECT BONUS " + (500*GameState.level) + "!!!",y,255,255,0) + y:+20 + EndIf + + If GameState.gonads + GFX.font.Centre("SECRET GONADS OF STEEL BONUS " + (9999+(GameState.level-1)*10000) + "!!!",y,255,255,0) + y:+20 EndIf If added