miércoles, 30 de octubre de 2013

Time to text m:ss

Time to text m:ss

Postby Kilinich » Sat Dec 15, 2012 2:04 pm
Might be useful:

CODE: SELECT ALL
//Convert time into "m:ss"
scene.my.time2text := (t) => {
  s := math.toInt(t%60);
  math.toString(math.toInt(t/60)) + ":" + math.toString(s/10) + math.toString(s%10);
};
print("Algodoo running time: "+scene.my.time2text(system.time));
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
Posts: 1501
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


No hay comentarios:

Publicar un comentario