Default Variables - CodenameCrew/YoshiCrafterEngine GitHub Wiki
For each script, default variables/classes are automatically set/imported. These can be used to interact with the game, and mod it.
Variables
PlayState- Current PlayState instanceEngineSettings- Copy of the engine settings that you can mess with. Will have effect in game (not permanent)global-Map<String, Dynamic>shared between all hscripts. Useful for sharing FlxSprites.Paths- Instance of thePaths_Modclass used to get assets from your mod folder.
Classes
PlayState_- Workaround to accessPlayState's static values.FlxSprite- The main "game object" class..BitmapData- Bitmap Data used to do real time sprite editing (very slow, not recommended)FlxG- Global helper class for audio, input, the camera system, the debugger and other global properties.Paths_- Workaround to access the defaultPathsclass, and get access to the base game's menu assets.Std- The Std class provides standard methods for manipulating basic types.Math- This class defines mathematical functions and constants.FlxMath- A class containing a set of math-related functions.FlxAssetsAssets- The Assets class provides a cross-platform interface to access embedded images, fonts, sounds and other resource files. (only usable on assets in the assets folder.)ModSupport- The class used to configure hscripts.Note- Class for the notes you see in game.Character- Class used for the characters (Boyfriend, Girlfriend, Daddy Dearest)Conductor- Everything song and BPM relatedStringTools- This class provides advanced methods on Strings. (can't be used as an extension)FlxSound- This is the universal flixel sound object, used for streaming, music, and sound effects. (UsePaths.sound("path")to load a FlxSound)FlxEase- Static class with useful easer functions that can be used by tweens.FlxTween- Handles tweens
/!\ WARNING DUE TO HSCRIPT LIMITATIONS, FlxColor IS ACTUALLY A HELPER, THAT MEANS YOU'LL NEED TO USE new FlxColor(int) TO USE THE FLXCOLOR FUNCTIONS, AND USE flxColor.color TO USE IT AS AN INT. WARNING /!\
FlxColor- Class representing a color. Provides a variety of methods for creating and converting colors.Boyfriend- Based on theCharacterclass, this one handles Boyfriend's additional values.BackgroundDancer- Week 4's background dancing dancers (lmao)BackgroundGirls- Week 6's background dancing girlsFlxTypedGroup- This is an organizational class that can update and render a bunch ofFlxBasics.FlxTimer- A simple timer class, leveraging the new plugins system. Can be used with callbacks or by polling the finished flag. Not intended to be added to a game state or group; the timer manager is responsible for actually calling update(), not the user.Json- Cross-platform JSON API: it will automatically use the optimized native API if available.MP4Video- Handles MP4 Videos (can be used in cutscenes and mid-song)CoolUtil- Access to ninjamuffin99'sCoolUtilclass, providing... well... cool utils.FlxTypeText- This is loosely based on the TypeText class by Noel Berry, who wrote it for his Ludum Dare 22 game - Abandoned http://www.ludumdare.com/compo/ludum-dare-22/?action=preview&uid=1527FlxText- Extends FlxSprite to support rendering text. Can tint, fade, rotate and scale just like a sprite. Doesn't really animate though. Also does nice pixel-perfect centering on pixel fonts as long as they are only one-liners.FlxAxes- Used forscreenCenter()BitmapDataPlus-Unused.BitmapDatabut better. Used for the Blammed effect.RectanglePointWindow- Current window