-
Notifications
You must be signed in to change notification settings - Fork 8
CollageSprite
For every file or object or sprite sheet you add to COLLAGE, a class instance of CollageSprite is created and cached internally in the CollageManager (COLLAGE).
This is very important for setting your collision masks, if you need something else than GameMaker's default of Automatic Rectangular.
As shown in the Collage Builder Example, there are several methods available to define your collision mask. They are all in a builder pattern, including the .build() method, so you may freely chain your calls.
/// @func set_mask_automatic(_shape = bboxkind_rectangular, _tolerance = 0)
/// @desc Set automatic collision mask (gamemaker default)
static set_mask_automatic = function(_shape = bboxkind_rectangular, _tolerance = 0) {/// @func set_mask_full_image(_shape = bboxkind_rectangular, _tolerance = 0)
/// @desc Set a full-image mask with a shape
static set_mask_full_image = function(_shape = bboxkind_rectangular, _tolerance = 0) {/// @func set_mask_manual(_left, _top, _right, _bottom, _shape = bboxkind_rectangular)
/// @desc Set a manuel mask with border and shape
static set_mask_manual = function(_left, _top, _right, _bottom, _shape = bboxkind_rectangular) {/// @func set_mask_precise(_per_frame = true, _tolerance = 0)
/// @desc Set a precise mask, optionally per frame
static set_mask_precise = function(_per_frame = true, _tolerance = 0) {/// @func build()
/// @desc Builds the collision mask of the sprite
static build = function() { Raptor free: Animation ● StateMachine ● Files(Sync) ● Macros ● Logger ● Controllers ● LG Localization ● Particle Effects ● Tools, other Objects and Helpers
Raptor pro: RACE (The Random Content Engine) ● Savegame System ● UI Subsystem ● Shaders ● Files(Async) ● RichJson ● Scriptor
Back to Repo ● Wiki Home ● Copyright © coldrock.games
- Home
- Working with raptor
- Create a Game
- raptor's object model
- Macros
- Logger
- Controllers
- StateMachine
- Animation
- Particle Effects
- LG Localization
- Interfaces
- Tools, other Objects and Helpers
Raptor Pro Modules