Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
codescapade committed Sep 22, 2024
1 parent 41bdece commit b955fa5
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/jume/assets/AssetLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AssetLoader<T> implements Injectable {
* @param props Optional extra props needed to load the asset.
* @param keep Should the asset be stored.
*/
public function load(id: String, path: String, callback: (asset: T)->Void, ?props: Dynamic, ?keep: Bool) {}
public function load(id: String, path: String, callback: (asset: T) -> Void, ?props: Dynamic, ?keep: Bool) {}

/**
* Add an asset to this loaded that was loaded externally.
Expand Down
4 changes: 2 additions & 2 deletions src/jume/assets/Assets.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef LoadParams<T> = {
var assetType: Class<T>;
var id: String;
var path: String;
var callback: (asset: T)->Void;
var callback: (asset: T) -> Void;
var ?props: Dynamic;
var ?keep: Bool;
}
Expand All @@ -39,7 +39,7 @@ class Assets {
}
}

public function loadAll(items: Array<AssetItem>, callback: ()->Void) {
public function loadAll(items: Array<AssetItem>, callback: () -> Void) {
var loaded = 0;
for (item in items) {
load({
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/AtlasLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AtlasLoader extends AssetLoader<Atlas> {
super(Atlas);
}

public override function load(id: String, path: String, callback: (asset: Atlas)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: Atlas) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
assets.load({
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/BitmapFontLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BitmapFontLoader extends AssetLoader<BitmapFont> {
super(BitmapFont);
}

public override function load(id: String, path: String, callback: (asset: BitmapFont)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: BitmapFont) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
assets.load({
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/ImageLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ImageLoader extends AssetLoader<Image> {
super(Image);
}

public override function load(id: String, path: String, callback: (asset: Image)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: Image) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
final element = Browser.document.createImageElement();
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/ShaderLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ShaderLoader extends AssetLoader<Shader> {
super(Shader);
}

public override function load(id: String, path: String, callback: (asset: Shader)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: Shader) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
final extension = Path.extension(path);
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/SoundLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SoundLoader extends AssetLoader<Sound> {
super(Sound);
}

public override function load(id: String, path: String, callback: (asset: Sound)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: Sound) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
Browser.window.fetch(path).then((response) -> {
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/TextLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TextLoader extends AssetLoader<String> {
super(String);
}

public override function load(id: String, path: String, callback: (asset: String)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: String) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;
Browser.window.fetch(path).then((response) -> {
Expand Down
2 changes: 1 addition & 1 deletion src/jume/assets/TilesetLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TilesetLoader extends AssetLoader<Tileset> {
super(Tileset);
}

public override function load(id: String, path: String, callback: (asset: Tileset)->Void, ?props: Dynamic,
public override function load(id: String, path: String, callback: (asset: Tileset) -> Void, ?props: Dynamic,
?keep: Bool) {
keep ??= true;

Expand Down
2 changes: 1 addition & 1 deletion src/jume/audio/Audio.hx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class Audio implements Service {
* @param buffer The audio buffer to decode.
* @param callback The function to call when the decoding is complete.
*/
public function decodeSound(name: String, buffer: ArrayBuffer, callback: (sound: Sound)->Void) {
public function decodeSound(name: String, buffer: ArrayBuffer, callback: (sound: Sound) -> Void) {
#if !headless
context.decodeAudioData(buffer).then((data) -> {
if (data != null) {
Expand Down
4 changes: 2 additions & 2 deletions src/jume/ecs/System.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ typedef EntityList = {
var ?components: Array<Class<Component>>;
var ?updatables: Bool;
var ?renderables: Bool;
var ?addCallback: (entity: Entity)->Void;
var ?removeCallback: (entity: Entity)->Void;
var ?addCallback: (entity: Entity) -> Void;
var ?removeCallback: (entity: Entity) -> Void;
}

class System implements Injectable {
Expand Down
8 changes: 4 additions & 4 deletions src/jume/events/EventListener.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ typedef EventListenerParams = {
/**
* The function to call when the event is triggered.
*/
var callback: (Dynamic)->Void;
var callback: (Dynamic) -> Void;

/**
* Can the callback cancel an event.
Expand All @@ -27,7 +27,7 @@ typedef EventListenerParams = {
/**
* Extra filter before receiving an event.
*/
var ?filter: (Dynamic)->Bool;
var ?filter: (Dynamic) -> Bool;

/**
* Is this a game wide event, not tied to a scene.
Expand All @@ -52,7 +52,7 @@ class EventListener {
/**
* The function to call when the event is triggered.
*/
public final callback: (Dynamic)->Void;
public final callback: (Dynamic) -> Void;

/**
* If true this callback can cancel an event.
Expand All @@ -67,7 +67,7 @@ class EventListener {
/**
* Extra filter before receiving an event.
*/
public final filter: (Dynamic)->Bool;
public final filter: (Dynamic) -> Bool;

/**
* Is this a game wide event, not tied to a scene.
Expand Down
4 changes: 2 additions & 2 deletions src/jume/events/Events.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ typedef AddListenerParams<T> = {
/**
* The function to call when the event is triggered.
*/
var callback: (T)->Void;
var callback: (T) -> Void;

/**
* If true the callback can cancel the event so it doesn't trigger handlers lower in the list.
Expand All @@ -29,7 +29,7 @@ typedef AddListenerParams<T> = {
/**
* Optional extra filter before the callback receives and event.
*/
var ?filter: (T)->Bool;
var ?filter: (T) -> Bool;

/**
* Is this a game wide event, not tied to a scene.
Expand Down
2 changes: 1 addition & 1 deletion src/jume/tweens/Easing.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package jume.tweens;
/**
* Ease function type with five float parameters and a float return type.
*/
typedef Ease = (time: Float, begin: Float, change: Float, duration: Float)->Float;
typedef Ease = (time: Float, begin: Float, change: Float, duration: Float) -> Float;

/**
* Two times PI.
Expand Down
12 changes: 6 additions & 6 deletions src/jume/tweens/Tween.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ class Tween implements Injectable {
/**
* Function to call when the tween is complete.
*/
var onComplete: ()->Void;
var onComplete: () -> Void;

/**
* The function to call every update.
*/
var onUpdate: (target: Dynamic)->Void;
var onUpdate: (target: Dynamic) -> Void;

/**
* Called when a tween starts after a delay.
*/
var onStart: ()->Void;
var onStart: () -> Void;

/**
* The delay before the tween starts.
Expand Down Expand Up @@ -221,7 +221,7 @@ class Tween implements Injectable {
* @param callback The callback function.
* @return This tween.
*/
public inline function setOnComplete(callback: ()->Void): Tween {
public inline function setOnComplete(callback: () -> Void): Tween {
onComplete = callback;

return this;
Expand All @@ -232,7 +232,7 @@ class Tween implements Injectable {
* @param callback The callback function.
* @return This tween.
*/
public inline function setOnUpdate(callback: (target: Dynamic)->Void): Tween {
public inline function setOnUpdate(callback: (target: Dynamic) -> Void): Tween {
onUpdate = callback;

return this;
Expand All @@ -243,7 +243,7 @@ class Tween implements Injectable {
* @param callback The callback function.
* @return This tween
*/
public inline function setOnStart(callback: ()->Void): Tween {
public inline function setOnStart(callback: () -> Void): Tween {
onStart = callback;

return this;
Expand Down
2 changes: 1 addition & 1 deletion src/jume/view/ScaleModes.hx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ typedef ScaleModeParams = {
/**
* The scale mode function blueprint.
*/
typedef ScaleMode = (params: ScaleModeParams)->ScaleModeReturn;
typedef ScaleMode = (params: ScaleModeParams) -> ScaleModeReturn;

/**
* Scale the view to fit the canvas. Will cut off parts of the view to make it fit. Keeps aspect ratio.
Expand Down

0 comments on commit b955fa5

Please sign in to comment.