summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-06-04 00:20:39 +0000
committerIan C <ianc@noddybox.co.uk>2006-06-04 00:20:39 +0000
commit88d280bb46d7557a06d2ab0342e42896549c7f9a (patch)
tree248a0da43b9c556c9db17aeefaab94d6d444d458
parent5c62ce816b6d725ed33272f78f688e34e97e031a (diff)
Added smoke trail for missiles
-rw-r--r--gametypes.bmx9
-rw-r--r--missile_lock.bmx2
2 files changed, 10 insertions, 1 deletions
diff --git a/gametypes.bmx b/gametypes.bmx
index a89c366..7956568 100644
--- a/gametypes.bmx
+++ b/gametypes.bmx
@@ -265,6 +265,7 @@ Type Missile
Field turn:Double
Field speed:Double
Field accurate:Int
+ Field smoke:Int
Method New()
Select Rand(1,4)
@@ -291,6 +292,7 @@ Type Missile
If Rand(100)>50
accurate=True
EndIf
+ smoke=0
End Method
Method Update(tx:Double,ty:Double)
@@ -331,6 +333,13 @@ Type Missile
DrawImage(GFX.missile,x,y)
CollideImage(GFX.missile,x,y,0,0,MISSILE_LAYER,Self)
+ smoke:+1
+
+ If smoke=10
+ Particles.AddScaledImage(GFX.exhaust,x,y,0.1)
+ smoke=0
+ EndIf
+
If onscreen
x=x Mod 800
y=y Mod 600
diff --git a/missile_lock.bmx b/missile_lock.bmx
index 9518452..609f36b 100644
--- a/missile_lock.bmx
+++ b/missile_lock.bmx
@@ -102,7 +102,7 @@ FlushKeys()
While Not quit
GameState.Reset()
- 'GameState.SetLevel(10)
+ 'GameState.SetLevel(25)
MissileSet.StartLevel()
AsteroidSet.StartLevel()