Skip to content

swordcube/CubeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CubeScript Logo

CubeScript

A simple to use wrapper for HScript.

❕ Getting Started

Let's start off with the basics of using CubeScript. Here are some basic examples:

πŸ“œ Running a string

var script = new CubeScript("trace('Hello CubeScript!');", {preset: true, unsafe: false});
script.start(); // The trace runs as soon as the script starts.

πŸ“œ Running a file

var script = new CubeScript(File.getContent("myScript.hx"), {preset: true, unsafe: false});
script.start(); // The script's code runs as soon as the script starts.

πŸ“œ Running a function

var script = new CubeScript("
	function test(arg1, arg2) {
		trace('The test works!');
		trace(arg1);
		trace(arg2);
	}
", {preset: true, unsafe: false});
script.start(); // The function gets initialized when the script starts.
script.call("test", ["This is an int -> ", 0]);

About

A simple to use wrapper for HScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages