Difference between revisions of "Core"

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