2022-08-12 10:50:42 +02:00
|
|
|
local Base = require "framework.modules.world.actors.actor3D"
|
2019-07-20 17:46:40 +02:00
|
|
|
local Coin = Base:extend()
|
|
|
|
|
|
|
|
function Coin:new(world, x, y, z)
|
|
|
|
Coin.super.new(self, world, "coin", x, y, z + 16, 16, 16, 16, false)
|
|
|
|
self:setSprite("coin")
|
|
|
|
end
|
|
|
|
|
|
|
|
function Coin:takeCoin(other)
|
|
|
|
self.obj.GFX(self.world, self.x + 8, self.y + 8, self.z + 8, "sparkle")
|
|
|
|
self:destroy( )
|
|
|
|
end
|
|
|
|
|
|
|
|
return Coin
|