Class Living
Living, moving agents (i.e. survivors, bandits, zombies, trade jeeps...)
Implements
Inherited Members
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Living : Agent, Killable
Constructors
Living(LivingData, Faction, Point, Scene)
Create a mobile, living agent.
Declaration
public Living(LivingData data, Faction faction, Point position = null, Scene scene = null)
Parameters
Type | Name | Description |
---|---|---|
LivingData | data | |
Faction | faction | The Faction that this Living belongs to (default: player) |
Point | position | The point to place this Living at (default: 0, 0) |
Scene | scene | The Scene to place this Living in (default: current scene) |
Living(String, Faction, Point, Scene)
Create a mobile, living agent.
Declaration
public Living(string baseData, Faction faction, Point position = null, Scene scene = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseData | A template for the creation of this Humanoid (see data/npc) |
Faction | faction | The Faction that this Humanoid belongs to (default: player) |
Point | position | The point to place this Humanoid at (default: 0, 0) |
Scene | scene | The Scene to place this Humanoid in (default: current scene) |
Properties
AI
This Living's current AI
Declaration
public AI AI { get; set; }
Property Value
Type | Description |
---|---|
AI |
Body
Get the body graph attached to this agent
Declaration
public BodyGraph Body { get; set; }
Property Value
Type | Description |
---|---|
BodyGraph |
CurrentAnimation
This Living's current EAnimationType
Declaration
public EAnimationType CurrentAnimation { get; set; }
Property Value
Type | Description |
---|---|
EAnimationType |
Data
The data used to create and shape this Living.
Declaration
public LivingData Data { get; }
Property Value
Type | Description |
---|---|
LivingData |
EquippedWeapon
Get this Living's currently-equipped Weapon.
Declaration
public Weapon EquippedWeapon { get; }
Property Value
Type | Description |
---|---|
Weapon | This Living's currently-equipped weapon, or |
Inventory
This Living's inventory
Declaration
public Inventory Inventory { get; }
Property Value
Type | Description |
---|---|
Inventory |
IsSickOrWounded
Whether this Living is sick or wounded.
Declaration
public bool IsSickOrWounded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Traits
The Trait this Living has
Declaration
public List<Trait> Traits { get; }
Property Value
Type | Description |
---|---|
List<Trait> |
Methods
AddTrait(Trait, Double, Boolean, Boolean)
Add a Trait to this Living
Declaration
public void AddTrait(Trait trait, double durationInHours = null, bool allowDuplicateTrait = false, bool replace = false)
Parameters
Type | Name | Description |
---|---|---|
Trait | trait | The trait to add |
System.Double | durationInHours | The duration in hours (0 = permanent) |
System.Boolean | allowDuplicateTrait | Add this trait again even if it already exists on the agent |
System.Boolean | replace |
ReloadWeapon()
Tell this Agent to reload the Weapon they are holding.
Declaration
public bool ReloadWeapon()
Returns
Type | Description |
---|---|
System.Boolean | Whether the Weapon could be successfully reloaded |
See Also
ReloadWeapon(Weapon)
Tell this Agent to reload a Weapon they are holding.
Declaration
public bool ReloadWeapon(Weapon weapon)
Parameters
Type | Name | Description |
---|---|---|
Weapon | weapon | The weapon to reload. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the Weapon could be successfully reloaded |
See Also
RemoveTrait(Trait)
Remove a Trait from this Living
Declaration
public void RemoveTrait(Trait trait)
Parameters
Type | Name | Description |
---|---|---|
Trait | trait | The trait to remove |