summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game.html.coffee26
1 files changed, 13 insertions, 13 deletions
diff --git a/game.html.coffee b/game.html.coffee
index 26a9f1c..391499d 100644
--- a/game.html.coffee
+++ b/game.html.coffee
@@ -189,8 +189,8 @@ genPage = ->
# @px = px | 0
# @py = py | 0
@
- @Bubble = Bubble = @Sprite
- @HappyBubble = HappyBubble = class extends Bubble
+ @Bubble = @Sprite
+ @HappyBubble = class extends @Bubble
image: happybubble0
constructor: ->
@lr = 4
@@ -205,7 +205,7 @@ genPage = ->
return if @dead
# if dx * dx * 2 > qd
@dead = true
- @GrumpyBubble = GrumpyBubble = class extends Bubble
+ @GrumpyBubble = class extends @Bubble
image: grumpybubble0
constructor: ->
@lr = 7
@@ -226,7 +226,7 @@ genPage = ->
ovy = o.vy
o.py -= 3 + (ovy > 0 then @life -= ovy; ovy * 2 else 0)
@dead = true unless @life > 0
- @EvilBubble = EvilBubble = class extends Bubble
+ @EvilBubble = class extends @Bubble
image: evilbubble0
constructor: ->
@lr = 15
@@ -267,7 +267,7 @@ genPage = ->
@quitSlowBubbles = @>
return unless @slowedBubbles
@slowedBubbles = false
- @Stilla = Stilla = class extends Bubble
+ @Stilla = class extends @Bubble
image: stilla0
Bubble: @Bubble
constructor: ->
@@ -362,7 +362,7 @@ genPage = ->
@oxygen = oxygen
consume: @>
@oxygen *= 0.99999
- @Vaquita = Vaquita = class extends @Sprite
+ @Vaquita = class extends @Sprite
twist: [ pixyvaquita_twist_l, pixyvaquita_twist_r ]
constructor: ->
@lr = 16
@@ -377,7 +377,7 @@ genPage = ->
@lr = 18
super()
bumpedInto: (x)@> @oxygen.addFrom(x)
- @AiVaquita = AiVaquita = class extends Vaquita
+ @AiVaquita = class extends @Vaquita
constructor: ->
@image = pixyvaquita
@time = 0
@@ -401,7 +401,7 @@ genPage = ->
else if vx * vx + vy * vy > 2
@image = @twist[ @beat_lr++ & 1 ]
super()
- @Vilma = Vilma = class extends Vaquita
+ @Vilma = class extends @Vaquita
constructor: (@game)->
@image = pixyvaquita
@time = 0
@@ -517,7 +517,7 @@ genPage = ->
# n.setAttribute "transform", ""
# sea.appendChild n
angle = Math.random() * 6.28
- v = new AiVaquita
+ v = new @AiVaquita
v.vx = 0
v.vy = 0
v.px = Math.floor(Math.sin(angle) * 300)
@@ -617,17 +617,17 @@ genPage = ->
happybubble:
__proto__: encounter
p: (depth)@> 0.0001 * (1.5 - depth)
- creature: HappyBubble
+ creature: @HappyBubble
vy: -1
grumpybubble:
__proto__: encounter
p: (depth)@> depth < 0.08 then 0 else (depth - 0.08) * 0.00015
- creature: GrumpyBubble
+ creature: @GrumpyBubble
vy: -3
evilbubble:
__proto__: encounter
p: (depth)@> depth < 0.35 then 0 else (depth - 0.35) * 0.00005
- creature: EvilBubble
+ creature: @EvilBubble
vy: -8
stilla:
__proto__: encounter
@@ -1184,7 +1184,7 @@ genPage = ->
bluescape.h = rady
bluescape.init( { screenw: radx * 2, screenh: rady * 2 } )
- v = new Vilma(@) # jaws.Sprite x:screen_x1*2, y:screen_y1*2, zoom:2, image:pixyvaquita
+ v = new @Vilma(@) # jaws.Sprite x:screen_x1*2, y:screen_y1*2, zoom:2, image:pixyvaquita
v.px = 0
v.py = 0
v.vx = 0