Difference between revisions of "Core"
(removed language stuff) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
=== Example === | === Example === | ||
− | < | + | <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 | ||
− | </ | + | </syntaxhighlight> |
{|- | {|- | ||
Line 20: | Line 20: | ||
=== Methods === | === Methods === | ||
[[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.asyncCall]] ''launches function on separate thread as background task''<br/><!--GIDEROSMTD:Core.asyncCall(task,parameters) launches 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--> | ||
[[Core.class]] ''creates and returns new Gideros class''<br/><!--GIDEROSMTD:Core.class(base) creates and returns a new Gideros class--> | [[Core.class]] ''creates and returns new Gideros class''<br/><!--GIDEROSMTD:Core.class(base) creates and returns a new Gideros class--> | ||
+ | [[Core.enableAllocationTracking]] ''returns table with data about object allocation''<br/><!--GIDEROSMTD:Core.enableAllocationTracking() returns table with data about object allocation--> | ||
[[Core.frameStatistics]] ''returns table with data about frame''<br/><!--GIDEROSMTD:Core.frameStatistics() returns a table with data about frame--> | [[Core.frameStatistics]] ''returns table with data about frame''<br/><!--GIDEROSMTD:Core.frameStatistics() returns a table with data about frame--> | ||
+ | [[Core.getScriptPath]] ''returns the path to a script''<br/><!--GIDEROSMTD:Core.getScriptPath() returns the path to a script--> | ||
[[Core.profilerReport]] ''outputs profiling results''<br/><!--GIDEROSMTD:Core.profilerReport() outputs profiling results--> | [[Core.profilerReport]] ''outputs profiling results''<br/><!--GIDEROSMTD:Core.profilerReport() outputs profiling results--> | ||
[[Core.profilerReset]] ''clears recorded profiling data''<br/><!--GIDEROSMTD:Core.profilerReset() clears recorded profiling data--> | [[Core.profilerReset]] ''clears recorded profiling data''<br/><!--GIDEROSMTD:Core.profilerReset() clears recorded profiling data--> | ||
Line 28: | Line 31: | ||
[[Core.random]] ''generates a random number''<br/><!--GIDEROSMTD:Core.random(generator,bound1,bound2) generates a random number--> | [[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.randomSeed]] ''sets the random generator seed''<br/><!--GIDEROSMTD:Core.randomSeed(generator,seed) sets the random generator seed--> | ||
− | [[Core.yield]] ''yields function running as background task''<br/><!--GIDEROSMTD:Core.yield(state) yields function running as background task--> | + | [[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;"| | | style="width: 50%; vertical-align:top;"| |
Latest revision as of 03:32, 8 November 2024
Supported platforms:
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
MethodsCore.asyncCall launches function on separate thread as background task |
EventsConstants |