epervier-old/examples/scenes/gameplay/plateform/actors/coin.lua

14 lines
337 B
Lua

local Base = require "framework.modules.world.actors.actor2D"
local Coin = Base:extend()
function Coin:new(world, x, y)
Coin.super.new(self, world, "coin", x, y, 16, 16, false)
self:setSprite("coin")
end
function Coin:takeCoin(other)
self.obj.GFX(self.world, self.x + 8, self.y + 8, "sparkle")
self:destroy( )
end
return Coin