From 3dfe79a2b2ac3b89b7708a2e49edb7fd32e0f121 Mon Sep 17 00:00:00 2001 From: entar Date: Tue, 10 Jun 2025 12:23:05 +0700 Subject: [PATCH] Update Types --- Types.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Types.md b/Types.md index f410545..d7e3f83 100644 --- a/Types.md +++ b/Types.md @@ -50,6 +50,7 @@ Every update updates the sprite based on it's current animation and framerate. - `Sprite.modifier` - number -- Scroll factor relative to camera position. 0-inf. - `Sprite.layer` - number -- Layer that Sprite renders on. - `Sprite.rotation` - number -- Sprite rotation. +- `Sprite.flipX` - boolean -- If sprite gets flipped on X axis. CHANGES SPRITE POSITION TO BE EXACTLY -width. ## Functions - `Sprite:Destroy()` -- Removes the sprite from the list, won't render anymore. Cache still remains. @@ -70,10 +71,29 @@ Sprite, but doesn't play a animation and saves up space and game FPS. - `Rect.modifier` - number -- Scroll factor relative to camera position. 0-inf. - `Rect.layer` - number -- Layer that Rect renders on. - `Rect.rotation` - number -- Rect rotation. +- `Rect.flipX` - boolean -- If rect gets flipped on X axis. CHANGES RECT POSITION TO BE EXACTLY -width. # Functions - `Rect:Destroy()` -- Removs the rect from the list, won't render anymore. Cache still remains. - `Rect:Frame(string, number)` -- Sets the current animation and a frame for the Rect. ## Creation -myTypes.Rect(string, string) -- Image path, Atlas path \ No newline at end of file +myTypes.Rect(string, string) -- Image path, Atlas path + +# Character + +Typically you wouldn't need to call this one, but it still needs to be here for the special people. + +## Children: +- `Character.sprite` - Sprite -- Character sprite. Typically used for position changing or resizing. +- `Character.scale` - parsed.scale -- Character resize. Isn't applied yet, just change the scale directly. +- `Character.singing` - boolean -- Isn't used directly, but changes on PlayAnimation(). +- `Character.stagePosition` - Vector2 -- Get's applied with stage.json positions in playstate.lua, if needed you can change that mid-events. +- `Character.stageCamera` - Vector2 -- Get's applied with json positions in character type function. +- `Character.flipX` - boolean -- Whenether does character get flipped or not (Sprite.flipX). +- `Character.beats` - number -- How many beats does GF character need to bop. +- `Character.animation` - string -- Isn't called directly. Changed in PlayAnimation(). +- `Character.icon` - string -- Taken from json. + +## Functions +- `Character:PlayAnimation(string)` -- Plays the animation based on json Name, FPS and Offsets. \ No newline at end of file