Animal Properties |
The Animal type exposes the following members.
Name | Description | |
---|---|---|
![]() | Antennas | 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. |
![]() | CanEat | 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. |
![]() | CanReproduce | 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. |
![]() | CurrentAttackAction | 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. |
![]() | CurrentDefendAction | 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. |
![]() | CurrentEatAction | 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. |
![]() | CurrentMoveToAction | 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. |
![]() | CurrentReproduceAction | 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. |
![]() | ID | 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. |
![]() | IsAttacking | 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. |
![]() | IsDefending | 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. |
![]() | IsEating | 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. |
![]() | IsMoving | 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. |
![]() | IsReproducing | 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. |
![]() | OrganismRandom | 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. |
![]() | Position | Each creature is centered in the game world to a specific point. The Position property can be used to query for this location. |
![]() | SerializedStream | (Inherited from Organism.) |
![]() | Species |
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.
|
![]() | State |
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.
|
![]() | Trace | (Inherited from Organism.) |
![]() | TurnsSkipped | 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. |
![]() | WorldHeight | 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. |
![]() | WorldWidth | 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. |