Difference between revisions of "Core"

From GiderosMobile
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
 
 
<!-- GIDEROSOBJ:Core -->
 
<!-- GIDEROSOBJ:Core -->
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
+
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/>
'''<translate>Available since</translate>:''' Gideros 2012.2<br/>
+
'''Available since:''' Gideros 2012.2<br/>
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
+
'''Inherits from:''' [[Object]]<br/>
  
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Gideros Core functions.</translate>
+
Gideros Core functions.
  
=== <translate>Examples</translate> ===
+
=== Example ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
MySprite = Core.class(Sprite)
 
MySprite = Core.class(Sprite)
 
--my custom sprite class
 
--my custom sprite class
 
function MySprite:init()
 
function MySprite:init()
 
end
 
end
</source>
+
</syntaxhighlight>
  
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Methods</translate> ===
+
=== Methods ===
[[Special:MyLanguage/Core.asyncCall|Core.asyncCall]] ''<translate>Launch function on separate thread as background task</translate>''<br/>
+
[[Core.asyncCall]] ''launches function on separate thread as background task''<br/><!--GIDEROSMTD:Core.asyncCall(task,parameters) launches function on separate thread as background task-->
<!-- GIDEROSMTD:Core.asyncCall(task,parameters) Launch function on separate thread as background task -->
+
[[Core.asyncThread]] ''launches function on separate thread as a parallel task''<br/><!--GIDEROSMTD:Core.asyncThread(task,parameters) launches function on separate thread as a parallel task-->
[[Special:MyLanguage/Core.class|Core.class]] ''<translate>Creates and returns new Gideros class</translate>''<br/>
+
[[Core.class]] ''creates and returns new Gideros class''<br/><!--GIDEROSMTD:Core.class(base) creates and returns a new Gideros class-->
<!-- GIDEROSMTD:Core.class(base) Creates and returns new Gideros class -->
+
[[Core.enableAllocationTracking]] ''returns table with data about object allocation''<br/><!--GIDEROSMTD:Core.enableAllocationTracking() returns table with data about object allocation-->
[[Special:MyLanguage/Core.frameStatistics|Core.frameStatistics]] ''<translate>Return table with data about frame</translate>''<br/>
+
[[Core.frameStatistics]] ''returns table with data about frame''<br/><!--GIDEROSMTD:Core.frameStatistics() returns a table with data about frame-->
<!-- GIDEROSMTD:Core.frameStatistics() Return table with data about frame -->
+
[[Core.getScriptPath]] ''returns the path to a script''<br/><!--GIDEROSMTD:Core.getScriptPath() returns the path to a script-->
[[Special:MyLanguage/Core.profilerReport|Core.profilerReport]] ''<translate>Output profiling results</translate>''<br/>
+
[[Core.profilerReport]] ''outputs profiling results''<br/><!--GIDEROSMTD:Core.profilerReport() outputs profiling results-->
<!-- GIDEROSMTD:Core.profilerReport() Output profiling results -->
+
[[Core.profilerReset]] ''clears recorded profiling data''<br/><!--GIDEROSMTD:Core.profilerReset() clears recorded profiling data-->
[[Special:MyLanguage/Core.profilerReset|Core.profilerReset]] ''<translate>Clear recorded profiling data</translate>''<br/>
+
[[Core.profilerStart]] ''starts profiling lua code''<br/><!--GIDEROSMTD:Core.profilerStart() starts profiling lua code-->
<!-- GIDEROSMTD:Core.profilerReset() Clear recorded profiling data -->
+
[[Core.profilerStop]] ''stops profiling''<br/><!--GIDEROSMTD:Core.profilerStop() stops profiling-->
[[Special:MyLanguage/Core.profilerStart|Core.profilerStart]] ''<translate>Start profiling lua code</translate>''<br/>
+
[[Core.random]] ''generates a random number''<br/><!--GIDEROSMTD:Core.random(generator,bound1,bound2) generates a random number-->
<!-- GIDEROSMTD:Core.profilerStart() Start profiling lua code -->
+
[[Core.randomSeed]] ''sets the random generator seed''<br/><!--GIDEROSMTD:Core.randomSeed(generator,seed) sets the random generator seed-->
[[Special:MyLanguage/Core.profilerStop|Core.profilerStop]] ''<translate>Stop profiling</translate>''<br/>
+
[[Core.signal]] ''creates a signal for use by parallel threads''<br/><!--GIDEROSMTD:Core.signal() creates a signal for use by parallel threads-->
<!-- GIDEROSMTD:Core.profilerStop() Stop profiling -->
+
[[Core.yield]] ''yields function running as background task''<br/><!--GIDEROSMTD:Core.yield(state,nowait) yields function running as background task-->
[[Special:MyLanguage/Core.random|Core.random]] ''<translate>Generate a random number</translate>''<br/>
+
[[Core.yieldable]] ''checks if current thread can yield''<br/><!--GIDEROSMTD:Core.yieldable() checks if current thread can yield-->
<!-- GIDEROSMTD:Core.random(generator,bound1,bound2) Generate a random number -->
 
[[Special:MyLanguage/Core.randomSeed|Core.randomSeed]] ''<translate>Set the random generator seed</translate>''<br/>
 
<!-- GIDEROSMTD:Core.randomSeed(generator,seed) Set the random generator seed -->
 
[[Special:MyLanguage/Core.yield|Core.yield]] ''<translate>Yield function running as background task</translate>''<br/>
 
<!-- GIDEROSMTD:Core.yield(state) Yield function running as background task -->
 
  
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
=== <translate>Events</translate> ===
+
=== Events ===
=== <translate>Constants</translate> ===
+
=== Constants ===
 
|}
 
|}
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 03:32, 8 November 2024

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2012.2
Inherits from: Object

Description

Gideros Core functions.

Example

MySprite = Core.class(Sprite)
--my custom sprite class
function MySprite:init()
end

Methods

Core.asyncCall launches function on separate thread as background task
Core.asyncThread launches function on separate thread as a parallel task
Core.class creates and returns new Gideros class
Core.enableAllocationTracking returns table with data about object allocation
Core.frameStatistics returns table with data about frame
Core.getScriptPath returns the path to a script
Core.profilerReport outputs profiling results
Core.profilerReset clears recorded profiling data
Core.profilerStart starts profiling lua code
Core.profilerStop stops profiling
Core.random generates a random number
Core.randomSeed sets the random generator seed
Core.signal creates a signal for use by parallel threads
Core.yield yields function running as background task
Core.yieldable checks if current thread can yield

Events

Constants