yes, my code for timer is :
Script.font = "" -- path "Font" -- use TrueType font file
Script.pos = Vec2(0,30) -- Vec2 "Position"
Script.size = 15 -- float "Size"
Script.color = Vec4(1,1,0,1) -- color "Color"
Script.offset = 20 -- int "Offset" -- make larger if numbers get cut off
function Script:Start()
self.font = Font:Load(self.font,self.size)
if self.font == nil then
Debug:Error("Select a font")
end
end
function Script:PostRender(context)
defaultFont = context:GetFont()
r = self.size + self.offset
w = self.pos.x + window:GetWidth()/2 - self.offset
h = self.pos.y
--time factor
time = Time:GetCurrent()/1000
context:SetBlendMode(1)
context:SetColor(self.color)
context:SetFont(self.font)
context:DrawText(Math:Round(time),w,h,r,r,Text.VCenter+Text.Center)
context:SetFont(defaultFont)
end