|
Submit
Your Own Code
PSP Lua CodeBase : Game TimerDescription:
its a game timer for if you want to count down to something
-- EVILMANA.COM PSP LUA CODEBASE
-- www.evilmana.com/tutorials/codebase
-- Game Timer
-- SUBMITTED BY: dtodabreezy
red=Color.new(255,0,0)
black=Color.new(0,0,0)
--i like this font becuz it dosent get in the way
proportional = Font.createProportional()
proportional:setPixelSizes(0,25)
--time for game
gametimer=Timer.new()
time=60
gametimer:start()
while true do
--gets time
gamestime=gametimer:time()
-- take this out to use in game
screen:clear(black)
--tells it count down 1 second every second
if gamestime>1000 then time=time - 1 gametimer:reset(0) gametimer:start()
end
screen:fontPrint(proportional, 220, 25, time, red)
Back to CodeBase
|