TinyLifeExampleMod/Api/TinyLife/World/Roof.md

2.6 KiB

Roof

Namespace: TinyLife > World

Assembly: Tiny Life.dll

Implements IPricedObject

Summary

A roof is an object on a TinyLife.World.Map that is on a higher level and cannot be interacted with by people

Constructors

Name Summary
Roof ( RoofType, Rectangle, Direction2, Int32 ) Creates a new roof with the given settings

Fields

Type Name Summary
Rectangle Area The area that this roof covers
Int32 Color The color index in in TinyLife.Utilities.ColorScheme.WarmDark that this roof uses for its top
RoofType Type The TinyLife.World.RoofType that this roof has
Wallpaper Wallpaper The TinyLife.World.Roof.Wallpaper that is applied to this roof. This defaults to the Default wallpaper.

Properties

Type Name Summary
Direction2 Rotation The rotation that this roof has. This is only relevant for roofs that don't have the TinyLife.World.RoofType.Flat type.

Methods

Return Name Summary
Single GetPrice ( )

Static Methods

Return Name Summary
void Draw ( GameTime, SpriteBatch, Map, RoofType, Rectangle, Direction2, Int32, Wallpaper, Single ) Draws the given TinyLife.World.Roof in world space
void DrawUi ( SpriteBatch, Element, RoofType, Int32, Single ) Draws a TinyLife.World.Roof in ui space, only drawing a 1x1 area of it
void GenerateRoof ( Room ) Generates the roofing for the given TinyLife.World.Room and adds it to the map. The generated roofing is split into as few separate parts as possible by ordering the tiles the room covers.
Int32 GetPriceByType ( RoofType ) Returns the price of the given TinyLife.World.RoofType