TinyLifeExampleMod/Api/TinyLife/Objects/AbstractSpot.md

2 KiB

AbstractSpot

Namespace: TinyLife > Objects

Assembly: Tiny Life.dll

Summary

An TinyLife.Objects.AbstractSpot is a base class for TinyLife.Objects.ObjectSpot and TinyLife.Objects.ActionSpot.

Fields

Type Name Summary
Int32 Group The groups that this spot has, which is interpreted as a bit flag. Two action spots with overlapping groups ((g1 AND g2) != 0) cannot both be occupied by two different people. This is used by things lke TinyLife.Objects.FurnitureType.ModernBed to stop people from sitting on a side there someone is already sleeping. By default, this is set to 0, meaning there is no group set.

Properties

Type Name Summary
Single YOffset The offset on the visual y axis that the TinyLife.Objects.Furniture or TinyLife.Objects.Person slotted into this spot should render with

Methods

Return Name Summary
Boolean DoGroupsOverlap ( AbstractSpot ) Returns whether the passed TinyLife.Objects.AbstractSpot's TinyLife.Objects.AbstractSpot.Group and this spot's Group overlap. Two overlapping groups are groups for which (g1 AND g2) != 0.
Vector2 GetLocation ( Furniture, Boolean ) Returns the location that this spot has in world space, based on the given TinyLife.Objects.Furniture and its position and rotation.
IEnumerable<Direction2> GetValidDirections ( Direction2 ) Returns the TinyLife.Objects.AbstractSpot.ValidDirections of this spot, but rotated by the given MLEM.Misc.Direction2.