mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-11-04 21:29:08 +01:00
3.9 KiB
3.9 KiB
Wall
Namespace: TinyLife > World
Assembly: Tiny Life.dll
Implements IGenericDataHolder, IPricedObject
Summary
A wall is an element of a TinyLife.World.Map
that stops traversal and that has a TinyLife.World.Wallpaper
and optionally an TinyLife.World.Wall.Opening
attached to it.
Constructors
Name | Summary |
---|---|
Wall ( Point [] ) |
Creates a new wall at the given position, with the implicitly given verticality |
Fields
Type | Name | Summary |
---|---|---|
Point[] | Positions | The two positions that this wall is placed in. The two positions refer to the tile coordinate of the tile on the front face of the wall, and the tile coordinate of the tile on the back face of the wall. |
Wallpaper[] | Wallpapers | The two wallpapers attached to this TinyLife.World.Wall , on either one of its sides |
Properties
Type | Name | Summary |
---|---|---|
Opening | Opening | The TinyLife.World.Wall.Opening attached to this wall, or null if there is none. Use TinyLife.World.Wall.SetOpening(TinyLife.World.Map,TinyLife.World.Opening) to set this value. |
Boolean | Vertical | Stores whether this wall is vertical. A vertical wall is one where the TinyLife.World.Wall.Positions have the same y, but different x coordinates. |
Methods
Return | Name | Summary |
---|---|---|
void | Draw ( Map , GameTime , SpriteBatch , Vector2 ) |
Draws this wall in the world, along with its TinyLife.World.Wall.Wallpapers and TinyLife.World.Wall.Opening |
Single | GetDepth ( Map , Single ) |
Returns the depth that should be used for a wall placed at this wall's positions. This method is used for rendering TinyLife.World.Wallpaper and TinyLife.World.Wall.Opening . |
WallMode | GetDisplayMode ( ) | Returns the TinyLife.World.WallMode that this wall should be rendered with. If the TinyLife.World.Wall.Opening is nonnull, its TinyLife.World.OpeningType.WallMode is returned. |
Int32 | GetIndexForCamera ( ) | Returns the side of the wall that should be rendered. For TinyLife.World.Wall.Vertical walls, the position with the highest X value is returned. For non-TinyLife.World.Wall.Vertical walls, the position with the highest Y value is returned. |
Single | GetPrice ( ) | |
Boolean | IsDown ( ) | Returns whether this wall should be rendered with a lower height than its actual height. If this value returns true, TinyLife.World.Wall.Draw(TinyLife.World.Map,Microsoft.Xna.Framework.GameTime,Microsoft.Xna.Framework.Graphics.SpriteBatch,Microsoft.Xna.Framework.Vector2) only draws the first 5 or so pixels of the wall to allow for a simple view of what is behind the wall. This value is based on the lot visibility, the TinyLife.Options.WallMode and more. |
void | SetOpening ( Map , Opening ) |
Changes the TinyLife.World.Wall.Opening in this wall to the specified one |
Boolean | Validate ( ) | This method is called when this object is loaded from disk. |
Static Fields
Type | Name | Summary |
---|---|---|
WallMode[] | DisplayModes | All defined values of the TinyLife.World.WallMode enumeration |
Int32 | Price | The price of building a single wall element |