https://wiki.sine.space/index.php?title=Timer&feed=atom&action=history Timer - Revision history 2024-03-28T23:40:34Z Revision history for this page on the wiki MediaWiki 1.26.3 https://wiki.sine.space/index.php?title=Timer&diff=74786&oldid=prev Eric MA: Created page with "{{Template:Infobox |above=Timer |subheader=Component |image=400px |caption=Component's Inspector }} ''Note: This is a new component and may not included in..." 2019-02-14T09:52:33Z <p>Created page with &quot;{{Template:Infobox |above=Timer |subheader=Component |image=<a href="/index.php?title=File:Timer.png" title="File:Timer.png">400px</a> |caption=Component&#039;s Inspector }} &#039;&#039;Note: This is a new component and may not included in...&quot;</p> <p><b>New page</b></p><div>{{Template:Infobox<br /> |above=Timer<br /> |subheader=Component<br /> |image=[[File:Timer.png|400px]]<br /> |caption=Component's Inspector<br /> }}<br /> ''Note: This is a new component and may not included in the current Editor pack. It would add in the builds later(after Feb 14, 2019)''<br /> <br /> Timer is a component which offers a simple time counter, which include multi-functions to use.<br /> <br /> By default, it's a increasing timer. If you want a count down type, pick the option for &quot;count down&quot;.<br /> <br /> Fill the Target time in seconds if you want the timer to stop by certain time. It is necessary if you choose &quot;count down&quot; type.<br /> <br /> Now there are 3 format: HHMMSS is stand for hours:minutes:seconds, MMSS means minutes:seconds, and the last is only display seconds.<br /> <br /> If you need to display the fraction after seconds, pick &quot;Show fraction&quot; option.<br /> <br /> You can add Events here, and trigger them when:<br /> <br /> 1. Pick the option &quot;Call Event When Timer End&quot;, the events will be fired when the timer reaches the Target time(or decrease to 0 from the Target time if count down);<br /> <br /> 2. Fire the events once in a delay after the timer start if the value here is above zero;<br /> <br /> 3. Fire the events every certain time by the value set if it is above zero;<br /> <br /> All these method can be used together, which means you can trigger the event after a short while for the first time, then repeat it periodically, and trigger it last time when the timer reaches the preset end.<br /> <br /> The component offer a default output method, so you can directly drag a game object with Text Component into the slot, the timer will display in that Text Label. But if you want to construct your own way for output, call the function OutputByFormat(), which returns the string of current value of timer.<br /> <br /> To start/pause the timer by event, change the bool value of timeRunning, where true start the timer and false pause it.<br /> <br /> To stop and reset the timer, call the function of ResetTimer(), it will set the timer back to the initial state you set. <br /> {{Component Navbox}}</div> Eric MA