Roofs
Extends: Node2D
Description
The parent class holding all Roof of a Level.
Properties
Level | Level |
bool | Shade |
float | SunDirection |
float | ShadeContrast |
Methods
Roof | CreateRoof ( int sorting ) |
Dictionary | Save ( ) |
void | Load ( Dictionary data ) |
Roof | LoadRoof ( Dictionary data ) |
Roof | UpdateSunlight ( bool enabled, float angle, float contrast ) |
void | Resize ( int x, int y, int w, int h ) |
Property Descriptions
- Level Level:
The Level in which this class instance resides.
- bool Shade:
Get or set if the sun shades the roofs. Set with UpdateSunlight().
- float SunDirection:
Get or set the direction of the sun in degrees. Set with UpdateSunlight().
- float ShadeContrast:
Get or set the contrast of the sun shading. Set with UpdateSunlight().
Method Descriptions
- Roof CreateRoof ( int sorting ):
Creates a Roof 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 Roofs and sun data in this level as a list into the save file format and return it as an Dictionary.
- void Load ( Dictionary data ):
Load a list of saved Roof data. Used by a saved map file to load existing Roofs.
- Roof LoadRoof ( Dictionary data ):
Load a single Roof into this level. Called by Load() as it loads all the Roofs.
- Roof UpdateSunlight ( bool enabled, float angle, float contrast ):
Make changes to the sunlight settings.