2022-08-12 10:50:42 +02:00
|
|
|
local Base = require "framework.modules.world.actors.actor2D"
|
2019-05-05 15:35:49 +02:00
|
|
|
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
|
|
|
|
|
2019-05-05 19:46:13 +02:00
|
|
|
function Coin:takeCoin(other)
|
2019-05-06 20:45:13 +02:00
|
|
|
self.obj.GFX(self.world, self.x + 8, self.y + 8, "sparkle")
|
2019-05-05 19:46:13 +02:00
|
|
|
self:destroy( )
|
|
|
|
end
|
|
|
|
|
2019-05-05 15:35:49 +02:00
|
|
|
return Coin
|