Puddle - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life

TinyLife.Objects

Puddle Class

internal class Puddle : TinyLife.Objects.Furniture,
TinyLife.Objects.IUpdatingObject

Inheritance System.Object 🡒 MLEM.Misc.GenericDataHolder 🡒 MapObject 🡒 Furniture 🡒 Puddle

Implements IUpdatingObject

Constructors

Puddle.Puddle(Guid, FurnitureType, int[], Map, Vector2) Constructor

Creates a new furniture instance.
By default, this is done using Construct(int[], Map, Vector2, Nullable<Guid>).

public Puddle(System.Guid id, TinyLife.Objects.FurnitureType type, int[] colors, TinyLife.World.Map map, Microsoft.Xna.Framework.Vector2 pos);

Parameters

id System.Guid
The id to apply to the created furniture instance

type FurnitureType
The type to create an instance of

colors System.Int32[]
The colors to apply to the furniture

map Map
The map to create the furniture on

pos Microsoft.Xna.Framework.Vector2
The position that the furniture should have

Methods

Puddle.Update(GameTime, TimeSpan, GameSpeed) Method

The update method, which is called every update frame by the underlying Map

public void Update(Microsoft.Xna.Framework.GameTime time, System.TimeSpan passedInGame, TinyLife.GameSpeed speed);

Parameters

time Microsoft.Xna.Framework.GameTime
The game's time

passedInGame System.TimeSpan
The amount of time that has passed since the last call

speed GameSpeed
The game's speed

Implements Update(GameTime, TimeSpan, GameSpeed)