Click or drag to resize
Animal Properties

The Animal type exposes the following members.

Properties
  NameDescription
Public propertyAntennas

Provides access to the creature's Antenna. Each Antenna has a specific set of positions that it may be in. Setting states with this information is possible as is passing numeric data.

Public propertyCanEat

Used to determine if your creature is capable of eating depending on the creature's current energy state. You can also trap the AlreadyFullException from BeginEating.

Public propertyCanReproduce

Determines whether all conditions are met for your organism to be able to reproduce. These conditions include various state information like whether your creature is mature, has enough energy, and is not already reproducing.

(Inherited from Organism.)
Public propertyCurrentAttackAction

After your creature has begun attacking you can get the AttackAction object that represents your creature's current attack action. You can use this to examine the target creature you're attacking and determine if there might be a more appropriate enemy.

Public propertyCurrentDefendAction

After your creature has begun defending you can get the DefendAction object that represents you're creatures current defend action. You can use this to examine the target creature you're defending against and determine if there might be a more appropriate enemy.

Public propertyCurrentEatAction

After your creature has begun eating you can get the EatAction object that represents you're creatures current eat action. You can use this to examine the target creature your eating and determine if their might be a better target to eat.

Public propertyCurrentMoveToAction

After your creature has begun moving you can get the MoveToAction object that represents your creature's current movement action. You can use this to examine the movement location and speed that your creature moving to see if you'll need to alter your course.

Public propertyCurrentReproduceAction

After your creature has begun reproduction you can get the ReproduceAction object that represents your creature's current reproduction. You can use this to examine the dna byte array that will be passed to the child.

(Inherited from Organism.)
Public propertyID

The unique GUID for an organism. This is used to store plant/animal state when being saved to disk, or when passing plant/animal information to children during reproduction.

(Inherited from Organism.)
Public propertyIsAttacking

Used to determine if your creature has been commanded to attack. You can also check the CurrentAttackAction property to get the actual target creature you're attacking. Because attacking is asynchronous your creature won't attack until the upcoming tick.

Public propertyIsDefending

Used to determine if your creature has been commanded to defend. You can also check the CurrentDefendAction property to get the actual target creature you're defending against. Because defending is asynchronous your creature won't defend until the upcoming tick.

Public propertyIsEating

Used to determine if your creature has been commanded to eat. You can also check the CurrentEatAction property to get the actual target creature you're eating. Because eating is asynchronous your creature won't actually eat until the upcoming tick.

Public propertyIsMoving

Used to determine if your creature has been commanded to move. You can also check the CurrentMoveToAction property to get the actual movement vector for your creature. Because moving is asynchronous your creature might not have started moving yet.

Public propertyIsReproducing

Determines if your organism is currently in the process of reproducing. Because reproducing is an asynchronous action, the organism may not actually be giving birth yet.

(Inherited from Organism.)
Public propertyOrganismRandom

To make random actions deterministic the creature should use this Random object when in need of a random number or variable in the creature's code. This can help aid in debugging so that strange behavior can be reproduced.

(Inherited from Organism.)
Public propertyPosition

Each creature is centered in the game world to a specific point. The Position property can be used to query for this location.

(Inherited from Organism.)
Public propertySerializedStream (Inherited from Organism.)
Public propertySpecies
Returns the immutable species object containing information about your creature's species related information. This includes how many points were placed into creature attributes and other values calculated from those points allocations.
Public propertyState
The current state of your own creature. This is used to get the latest information about your creature's health, damage, and other stats available on the AnimalState object.
Public propertyTrace (Inherited from Organism.)
Public propertyTurnsSkipped

A creature can get skipped for a number of turns if it takes too long to execute. There is a limit to the time an animal can use for processing every turn which is calculated dynamically by the Terrarium each time it starts based on your computer's processing power.

To see how long your creature takes to process, you can open the Trace window, unselect "Show Organism Traces", and then select your creature. Note that this time will be different depending on the machine.

If you do break the limit Terrarium determines how many ticks worth of time you've gone over the limit and sets this property. You can examine this property to recover from conditions where your creature is skipped for a given number of turns. This is useful since you may not receive events that fire while during the time your creature's turn is being skipped.

(Inherited from Organism.)
Public propertyWorldHeight

The height of the world in single points/pixels. Use this to make sure you don't try to move outside of the bounds of the Terrarium and to help manage your creature's population size/density.

Public propertyWorldWidth

The width of the world in single points/pixels. Use this to make sure you don't try to move outside of the bounds of the Terrarium and to help manage your creature's population size/density.

Top
See Also