Click or drag to resize
AnimalState Properties

The AnimalState type exposes the following members.

Properties
  NameDescription
Public propertyActualDirection

Determines the direction the creature is moving in degrees. This along with Speed can be used to calculate where a creature will be in the future.

(Inherited from OrganismState.)
Public propertyAnimalSpecies

Provides information about the Species of the creature through the IAnimalSpecies interface. This should be used to determine the stats of a creature for threat/food calculations.

Public propertyAntennas

Provides access to a read-only version of a 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.

This property is used to examine the Antenna state of other creatures. If you need to set the states of your own Antenna you should use the Antennas property on the Animal base class.

Public propertyCellRadius

Determines the number of game cells a creature uses on the screen. Each grid cell is 8 pixels in width and height.

(Inherited from OrganismState.)
Public propertyCurrentMoveToAction
Retrieves information about the creature's current movement vector. If the creature is moving this value will always be non null, and null if the creature isn't currently moving. This is used by the game engine since movement can encompass many turns.
(Inherited from OrganismState.)
Public propertyCurrentReproduceAction
Used to obtain or modify the current action representing the creature's reproduction status. If this value is not null then the creature is reproducing.
(Inherited from OrganismState.)
Public propertyDamage

Provides the absolute amount of damage an organism has sustained. Normally PercentInjured is more useful for determining how badly hurt your creature is, but this absolute number can be used for different types of calculations.

Some useful applications include examining the damage taken each tick, determining which creature has the MOST damage, not the highest percentage of damage. Determining if your creature can sustain a hit from another creature without dying. Determining a creature's statistical chance of winning a fight, along with updating this chance each round. Each of these can be done using the Damage property, but not the PercentInjured property.

Public propertyDeathReason

Describes the reason why the creature died. This is most often OldAge, Starvation, Killed, or Sickness. If the creature is not dead yet then the value will be NotDead.

(Inherited from OrganismState.)
Public propertyEnergyState

Determine the current energy state of a creature by comparing the current amount of stored energy versus the various energy buckets.

(Inherited from OrganismState.)
Public propertyFoodChunks

Determines the amount of food value this creature represents. This can be used to determine if attacking a creature will be worth the effort.

(Inherited from OrganismState.)
Public propertyGeneration

Generation will be 0 the first time a creature is introduced. Each offspring of a creature will be labeled with its generation plus one. This helps define the longevity of a creature.

(Inherited from OrganismState.)
Public propertyGridX

Retrieves the creature's current grid location. This is useful for movement algorithms and is used by the engine for computing organism location in a fast and memory efficient manner.

(Inherited from OrganismState.)
Public propertyGridY

Retrieves the creature's current grid location. This is useful for movement algorithms and is used by the engine for computing organism location in a fast and memory efficient manner.

(Inherited from OrganismState.)
Public propertyGrowthWait

Determines the amount of time in game ticks a creature must wait before they are able to grow. If a creature is not yet mature, and the GrowthWait is 0, then it is possible the creature does not have enough energy or enough space in order to grow. This should be remedied quickly.

(Inherited from OrganismState.)
Public propertyID

A string number in the form of a GUID that uniquely represents this creature in the EcoSystem.

(Inherited from OrganismState.)
Public propertyIncubationTicks

Determines the number of ticks the creature must wait before it has finished reproducing. If your creature just needs to know if it's currently reproducing use the IsIncubating property.

(Inherited from OrganismState.)
Public propertyIsAlive

Determines if the creature is alive or dead. This is used by Carnivores so they can find food in the form of corpses.

(Inherited from OrganismState.)
Public propertyIsImmutable
Determines if the current creature state is immutable.
(Inherited from OrganismState.)
Public propertyIsIncubating

Determines if the creature is in the process of reproduction. Use IncubationTicks to find out exactly how long the creature has left to incubate.

(Inherited from OrganismState.)
Public propertyIsMature

Determines if the creature is mature by comparing the current Radius to the Radius it will have when mature.

(Inherited from OrganismState.)
Public propertyIsStopped

Determines if the creature is moving or is completely stopped.

(Inherited from OrganismState.)
Public propertyOrganismEvents
When events are completed the completion actions get listed into a collection of completed events. These are then used by the processing functions to fire off events on the creature.
(Inherited from OrganismState.)
Public propertyPercentEnergy

Determines the decimal percentage of the amount of energy a creature currently has, versus the total amount of energy the creature can store.

(Inherited from OrganismState.)
Public propertyPercentInjured

Provides the percentage of damage taken versus total allowed damage before the creature is killed. This is useful in calculating which creature makes the best target due to weakness.

(Overrides OrganismStatePercentInjured.)
Public propertyPercentLifespanRemaining

Determines the decimal percentage of the amount of life remaining a creature currently has, versus the total amount of LifeSpan.

(Inherited from OrganismState.)
Public propertyPosition

Returns the creature's current position as a Point.

(Inherited from OrganismState.)
Public propertyPreviousDisplayAction (Overrides OrganismStatePreviousDisplayAction.)
Public propertyRadius

Determines the actual radius of the creature. This is used to determine how close to maturity a creature has gotten or in various computations on attack, defense, and movement.

(Inherited from OrganismState.)
Public propertyReadyToReproduce

Determines if a creature is ready to reproduce based on the elapsed time since its previous reproduction. Use ReproductionWait to determine exactly how long the creature has to go.

(Inherited from OrganismState.)
Public propertyRenderInfo
This property remains mutable even though the rest of the object is immutable because it is used by the renderer and maintains rendering state across worldstate instances (like whether the organism is selected or not).
(Inherited from OrganismState.)
Public propertyReproductionWait

Determines the number of ticks the creature must wait before reproducing again. If your creature just needs to know if it's ready the ReadyToReproduce property can be used instead.

(Inherited from OrganismState.)
Public propertyRotTicks

Provides the number of ticks a particular corpse has been rotting for. This is useful to determine whether a corpse will be around long enough to be used for food.

Under normal circumstances a corpse will remain for 100 ticks. However, this number may be shortened if the machine is under load and many creatures are dying from sickness.

Public propertySpecies

Describes the characteristics of a creature through the use of the ISpecies interface.

(Inherited from OrganismState.)
Public propertySpeed

Determines the speed at which the creature is moving. Useful in calculating overtake speeds for Carnivores and run-away speeds for Herbivores.

(Inherited from OrganismState.)
Public propertyStoredEnergy

Determines how much energy a creature has stored. This is used to compute the energy state of the creature.

(Inherited from OrganismState.)
Public propertyTickAge

Represents the age of a creature in game ticks. Once a creature reaches a TickAge identical to its LifeSpan the creature will die from PopulationChangeReason.OldAge.

(Inherited from OrganismState.)
Top
See Also