It looks like you're new here. If you want to get involved, click one of these buttons!
Tile = Core.class(Sprite) local function tileClicked(self, event) -- play tile sound local tileSound = Sound.new("assets/audio/tileSounds/" .. self.tileSound .. ".wav"); audioChannel = tileSound:play(); end function Tile:init(type, pValue, tSound) local tileUp = Bitmap.new(Texture.new("assets/tile_low.png")); local tileDown = Bitmap.new(Texture.new("assets/tile_high.png")); local tileBtn = Button.new(tileUp, tileDown); tileBtn:addEventListener("click", tileClicked, tileBtn); tileBtn.pointValue = pValue; tileBtn.tileSound = tSound; self:addChild(tileBtn); end |
Dislikes: hosamred
Comments