When I tap on the screen it should switch screens
Why doesn’t it do that?
Can you fix it so it does?
My Code
--# Colours
Colours = class()
function Colours:init(x)
-- you can accept and set parameters here
blue=color(0, 246, 255, 255)
black=color(0, 0, 0, 0)
white=color(255, 255, 255, 255)
darkblue=color(56, 0, 255, 255)
orange=color(255, 148, 0, 255)
end
function Colours:draw()
end
function Colours:touched(touch)
end
--# Main
--[[
For Art Tech Project
Due:November 30,2016
--]]
--displayMode(FULLSCREEN_NO_BUTTONS)
supportedOrientations(PORTRAIT)
function setup()
cam = vec2(0,0)
gameState=0
Colours:init()
howfardown=10
parameter.watch("CurrentTouch.y")
parameter.watch("CurrentTouch.x")--Parameters
parameter.integer("howfardown", 0, 1000, 5)
end
function draw()
if gameState==0
then
translate(cam.x,cam.y)
background(white)
strokeWidth(10)
stroke(0, 0, 0, 255)
--Lines
line(0,490,WIDTH,490)--Line umderneath graph
line(WIDTH/2,490,WIDTH/2,10)--Line Between Most and least Productive day
strokeWidth(20)
line(0,10,WIDTH,10)
fill(darkblue)
noStroke()
rect(0,HEIGHT-100,WIDTH,200)
font("AmericanTypewriter-CondensedBold")
fill(0, 0, 0, 255)
fontSize(40) text("Productive",WIDTH/2,HEIGHT-56)
fill(orange)
rect(75,884.5,30,30)--For legend
fill(blue)
rect(470,884.5,30,30)--For legend
fill(orange)
rect(10,500,100,300)--For graph (Non productive)
rect(260,500,100,250)--Add 250 to x value space between non productive graphs
rect(520,500,100,300)
fill(blue)
rect(110,500,100,200)--For Graph (Productive)
rect(360,500,100,350)
rect(620,500,100,240)
fill(0, 0, 0, 255)
textSize(8)
text("Most Productive Day",200,450)
text("Least Productive Day",570,450)
fill(orange)
rect(70, 25, 100, 30)--For Most Productive day
fill(blue)
rect(170, 25, 100, 300)--For Most Productive day
fill(orange)
rect(WIDTH/2+76,25,100,310)--For Least Productive day
fill(blue)
rect(WIDTH/2+76+100,25,100,10)--For least Productive Day
textSize(2)
fill(0, 0, 0, 255)
text("Productive",200,900)
text("Non-Productive",652-20,900)
end
if CurrentTouch.x > 0
then
gameState=2
end
if gameState==2
then
text("Question",200,200)
end
end