≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Any way to make a pause?
Posted by:
(you are not logged in)
Enter the missing letter in: "Interna?ional"
(you are not logged in)
Text:
[quote][b][/b] wrote: I edited script and added Game_Speed variable. So it can speedUP or slowDOWN gameTIMER [code]//Script by sven from ambiera forum. //for more stuff visit my youtube channel: //https://www.youtube.com/channel/UCN3jBL46fjoVrtGnpcnCO4w //also visit my itch page: //https://5v3n.itch.io/ /* <behavior jsname="behavior_GTime" description="GTime"> </behavior> */ //GLOBALS Game_Timer=0; Pause_Timer=0; game_paused=0; game_speed=1.0; behavior_GTime = function() { this.startTime = (new Date()).getTime(); } behavior_GTime.prototype.onAnimate = function() { //Now timer var now = (new Date()).getTime() ; //Game timer if (game_paused==0) { Game_Timer = ( (now-this.startTime)-Pause_Timer) *game_speed; } //Pause timer if (game_paused==1) { Pause_Timer = (now-this.startTime)-(Game_Timer/game_speed); } ccbSetSceneNodeProperty(ccbGetSceneNodeFromName("gt"), "Text", "GTime " +Game_Timer); ccbSetSceneNodeProperty(ccbGetSceneNodeFromName("pt"), "Text", "PTimer " +Pause_Timer); return true; } [/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact