some hscript stuff!!

This commit is contained in:
Yoshman29
2022-11-04 19:55:29 +01:00
parent ccf0c833b2
commit ea8e2ba35d
6 changed files with 33 additions and 12 deletions
+15
View File
@@ -9,6 +9,13 @@ import openfl.utils.Assets;
* Class used for scripting.
*/
class Script extends FlxBasic implements IFlxDestroyable {
/**
* Use "static var thing = true;" in hscript to use those!!
* are reset every mod switch so once youre done with them make sure to make them null!!
*/
public static var staticVariables:Map<String, Dynamic> = [];
public static function getDefaultVariables():Map<String, Dynamic> {
return [
// Haxe related stuff
@@ -128,6 +135,14 @@ class Script extends FlxBasic implements IFlxDestroyable {
curScript = oldScript;
}
/**
* HSCRIPT ONLY FOR NOW
* Sets the "public" variables map for ScriptPack
*/
public function setPublicMap(map:Map<String, Dynamic>) {
}
/**
* Hot-reloads the script, if possible
*/