AnimalState Methods |
The AnimalState type exposes the following members.
Name | Description | |
---|---|---|
![]() | AddIncubationTick |
Add a single tick to the current incubation period. Called
by the game engine each tick after the creature starts reproducing.
Once the amount of ticks hits the limit for the amount of time
required to incubate a child, the creature is born, and incubation
is no longer required.
(Inherited from OrganismState.) |
![]() | AddRotTick | |
![]() | AddTickToAge |
Adds a single tick to the creature's current age. This is
also responsible for ticking down other counters like growth
and reproduction. When ticks hits the LifeSpan the creature
dies, but when the other counters reach 0 the action becomes
available.
(Inherited from OrganismState.) |
![]() | BurnEnergy |
Used by the game engine to burn a creature's energy depending
on the various actions they perform including movement, reproduction,
and growth.
(Inherited from OrganismState.) |
![]() | CauseDamage | |
![]() | CloneMutable | (Overrides OrganismStateCloneMutable.) |
![]() | CompareTo |
Compares two organism state objects together. This method takes into
account the Y position for graphical Z-Ordering purposes and can be used
to sort creatures for back to front rendering.
(Inherited from OrganismState.) |
![]() | EnergyRequiredToMove | Provides a method for creatures to determine how much energy a specific movement action will cost. The slower a creature moves the less energy they expend moving over a specific distance. With this in mind the developer can determine the optimum speed at which to move to a given location versus time and energy consumption. |
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | Grow | (Overrides OrganismStateGrow.) |
![]() | HealDamage | (Overrides OrganismStateHealDamage.) |
![]() | IncreaseRadiusTo | (Overrides OrganismStateIncreaseRadiusTo(Int32).) |
![]() | IsAdjacentOrOverlapping | Determines if a creature is immediately next to or overlapping another creature using grid cells comparisons. |
![]() | IsWithinRect |
Used to compute whether or not a given state object is in an adjacent or
overlapping grid cell. The extra radius can be used to extend the area
used for the function to find a match and so can be used for functions
like visibiliy.
(Inherited from OrganismState.) |
![]() | Kill |
Called by the game engine in order to kill the current creature.
Since this method can only be called when the state is mutable
player's can't use the method to arbitrarily kill competing
organisms.
(Inherited from OrganismState.) |
![]() | LockSizeAndPosition |
Performs a special type of immutability lock for the size
and position related properties only. This is to ensure that
the area of a creature isn't changed after the creature's index
array position has been found in the game world.
(Inherited from OrganismState.) |
![]() | MakeImmutable |
Makes all properties immutable. Ensures that the organism state
cannot be changed at all by creatures with access to the state.
(Inherited from OrganismState.) |
![]() | ResetGrowthWait |
Used by the game engine to reset the amount of time the creature
must wait before growing. The wait time is based on the creature's
species class which uses the creature's lifepsan as a base for the
growth period. This should be called after a creature has been
given the chance to grow, and must wait before growing again.
(Inherited from OrganismState.) |
![]() | ResetReproductionWait |
Sets the current reproduction wait of the creature to
the wait time specified by the creature's species. This
value will be set based on the creature's lifespan and
creature type (whether carnivore or herbivore). This is
called by the engine after reproduction has completed.
(Inherited from OrganismState.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |