Skip to content

Objects

Extends: Node2D

Description

The parent class holding all Prop of a Level.

Properties

Level Level

Methods

Prop CreateObject ( int sorting )
Dictionary[] Save ( )
void Load ( Dictionary[] data )
PatternShape LoadObject ( Dictionary data )
void Resize ( int x, int y, int w, int h )
void AddToSearchTable ( Prop prop, bool movedToBack )
void RemoveFromSearchTable ( Prop prop )

Property Descriptions

  • Level Level:
    The Level in which this class instance resides.

Method Descriptions

  • Prop CreateObject ( int sorting ):
    Creates a Prop with the following options and adds it as a child. For the parameter sorting, valid options are: 0 = Over, 1 = Under.

  • Dictionary[] Save ( ):
    Save all Props in this level as a list into the save file format and return it as an Array.

  • void Load ( Dictionary[] data ):
    Load a list of saved Prop data. Used by a saved map file to load existing Props.


  • void Resize ( int x, int y, int w, int h ):
    Called automatically when the canvas is resized. DO NOT CALL DIRECTLY. FOR REFERENCE ONLY.

  • void AddToSearchTable ( Prop prop, bool movedToBack ):
    Adds a Prop to a table that makes it faster to find Props in the SelectTool. Called automatically by LoadObject() and when a Prop is created by the ObjectTool and ScatterTool. If you are directly creating a new Prop using CreateObject(), you must call this method manually afterwards. The parameter movedToBack lets the table know if you placed the Prop in the front or in the back of other Props.

  • void RemoveFromSearchTable ( Prop prop ):
    Removes a Prop from the search table. Called automatically by a Prop that is deleted. No need to call manually.