spark animation
This commit is contained in:
parent
cdea234377
commit
304480553f
23
vacation.p8
23
vacation.p8
@ -1297,7 +1297,7 @@ end
|
|||||||
-- 1: black (for sprites)
|
-- 1: black (for sprites)
|
||||||
-- 2: dolphin shading
|
-- 2: dolphin shading
|
||||||
-- 3: azure water, maybe score display? (140)
|
-- 3: azure water, maybe score display? (140)
|
||||||
-- 4, 5: unassigned, layer-specific
|
-- 4, 5: keep default in sky layer (for emergency awakener)
|
||||||
-- 6: dolphin specular highlights
|
-- 6: dolphin specular highlights
|
||||||
-- 7: dolphin white paint
|
-- 7: dolphin white paint
|
||||||
-- 8, 9: unassigned, layer specific
|
-- 8, 9: unassigned, layer specific
|
||||||
@ -1370,6 +1370,24 @@ function sea:draw()
|
|||||||
rectfill(0, 125+(w>>3), 128, 128, 0x1001)
|
rectfill(0, 125+(w>>3), 128, 128, 0x1001)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
spark = {
|
||||||
|
x=0,
|
||||||
|
y=0,
|
||||||
|
dx=0,
|
||||||
|
dy=0,
|
||||||
|
f=-1,
|
||||||
|
}
|
||||||
|
mknew(spark)
|
||||||
|
function spark:update()
|
||||||
|
self.f += 1
|
||||||
|
if (self.f >= 12) return true
|
||||||
|
self.x += self.dx
|
||||||
|
self.y += self.dy
|
||||||
|
end
|
||||||
|
function spark:draw()
|
||||||
|
spr(48+self.f\2, self.x, self.y)
|
||||||
|
end
|
||||||
|
|
||||||
arcade_level = {
|
arcade_level = {
|
||||||
score=0,
|
score=0,
|
||||||
max_score=999,
|
max_score=999,
|
||||||
@ -1455,7 +1473,8 @@ end
|
|||||||
function arcade_level:word_hit(word)
|
function arcade_level:word_hit(word)
|
||||||
self.score += 1
|
self.score += 1
|
||||||
-- TODO: sfx
|
-- TODO: sfx
|
||||||
-- TODO: sparkle
|
self.bg:push_back(spark.new{x=word.x-1, y=word.y-1, dx=-2})
|
||||||
|
self.bg:push_back(spark.new{x=word.x+word.w, y=word.y-1, dx=1})
|
||||||
end
|
end
|
||||||
|
|
||||||
function arcade_level:draw()
|
function arcade_level:draw()
|
||||||
|
Loading…
Reference in New Issue
Block a user