documentation

This commit is contained in:
Yoshman29
2022-10-10 12:21:24 +02:00
parent 9009916ce6
commit 8091f5463a
96 changed files with 224711 additions and 35 deletions
+3 -3
View File
@@ -130,7 +130,7 @@ class Script extends FlxBasic implements IFlxDestroyable {
* Calls the function `func` defined in the script.
* @param func Name of the function
* @param parameters (Optional) Parameters of the function.
* @return Dynamic Result (if void, then null)
* @return Result (if void, then null)
*/
public function call(func:String, ?parameters:Array<Dynamic>):Dynamic {
var oldScript = curScript;
@@ -151,14 +151,14 @@ class Script extends FlxBasic implements IFlxDestroyable {
/**
* Gets the variable `variable` from the script's variables.
* @param variable Name of the variable.
* @return Dynamic Variable (or null if it doesn't exists)
* @return Variable (or null if it doesn't exists)
*/
public function get(variable:String):Dynamic {return null;}
/**
* Gets the variable `variable` from the script's variables.
* @param variable Name of the variable.
* @return Dynamic Variable (or null if it doesn't exists)
* @return Variable (or null if it doesn't exists)
*/
public function set(variable:String, value:Dynamic):Void {}
+1 -1
View File
@@ -24,7 +24,7 @@ class ScriptPack extends Script {
* Sends an event to every single script, and returns the event.
* @param func Function to call
* @param event Event (will be the first parameter of the function)
* @return Event (modified by scripts)
* @return (modified by scripts)
*/
public function event<T:CancellableEvent>(func:String, event:T):T {
for(e in scripts) {
@@ -0,0 +1,28 @@
package funkin.scripting.events;
class InputSystemEvent extends CancellableEvent {
/**
* Array containing whenever a specific control is pressed or not.
* For example, `pressed[0]` will return whenever the left strum was pressed.
*/
public var pressed:Array<Bool>;
/**
* Array containing whenever a specific control was pressed (not hold) this frame or not.
* For example, `justPressed[0]` will return whenever the left strum was just pressed.
*/
public var justPressed:Array<Bool>;
/**
* Array containing whenever a specific control was released this frame or not.
* For example, `justReleased[0]` will return whenever the left strum was just released.
*/
public var justReleased:Array<Bool>;
public function new(pressed:Array<Bool>, justPressed:Array<Bool>, justReleased:Array<Bool>) {
super();
this.pressed = pressed;
this.justPressed = justPressed;
this.justReleased = justReleased;
}
}