TntVirtualPad
From GiderosMobile
Supported platforms:
Available since: Gideros 2019.4
Description
Adds a virtual pad to your game/app screen.
Examples
Add a virtual pad to the stage (or to your scene)
require "tntvirtualpad"
local texturevpad = TexturePack.new("gfx/tnt_virtual_pad/TNTVirtualPad.txt", "gfx/tnt_virtual_pad/TNTVirtualPad.png", true)
local vPad = CTNTVirtualPad.new(stage, texturevpad, PAD.STICK_SINGLE, PAD.BUTTONS_ONE, 100, 0)
vPad:setJoyStyle(PAD.COMPO_LEFTPAD, PAD.STYLE_FOLLOW)
vPad:setScale(PAD.COMPO_LEFTPAD, 1.5)
vPad:setScale(PAD.COMPO_BUTTON1, 1)
vPad:setHideDelay(3)
vPad:start()
--vPad:addEventListener(PAD.LEFTPAD_EVENT, self.myhero.onVKeyDown, self.myhero)
--vPad:addEventListener(PAD.BUTTON1_EVENT, self.myhero.vshoot, self.myhero)
Methods |
EventsConstants |