AntennaState Class |
Provides access to a creature's Antenna. Each creature has two Antenna that can be placed in 10 different positions each. This enables a multitude of states that can be used to communicate with other creatures of the same species or even creatures of different species.
By default both Antenna are positioned to the AntennaPosition.Left. In addition to setting the state of each individual Antenna. The author can also use the AntennaValue property to set a number from 0 to 99. This is provided for ease of use since most author developers will use this structure for passing data (cell data maybe?) rather than simple flags or states.
Namespace: Terrarium.Sdk.Classes.Creature
The AntennaState type exposes the following members.
Name | Description | |
---|---|---|
![]() | AntennaState(AntennaState) | Constructs a new AntennaState given the initial values from a pre-existing AntennaState. This effectively makes a copy without making the new state immutable. This can be used to copy states from another creature and then modified slightly. |
![]() | AntennaState(AntennaPosition, AntennaPosition) | Constructs a new AntennaState given the initial values for the LeftAntenna and RightAntenna. If the values are not within the ranged allowed by the AntennaState they will be defaulted to AntennaPosition.Left; |
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (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.) |
![]() | MakeImmutable | |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | AntennaValue | Used to get a numeric value between 0 and 99 that represents the AntennaPosition of both the LeftAntenna and RightAntenna. You can also set the position of both Antenna by specifying a new value between 0 and 99 if the AntennaState is not set to immutable. By default the AntennaState located on the Animal class is never marked immutable, and the AntennaState located on the AnimalState class is always immutable. You may also set each of the Antenna separately rather than using this special value that represents both Antenna numerically. |
![]() | LeftAntenna | Used to get the position of the LeftAntenna. You can also set the position of the LeftAntenna if the AntennaState is not set to immutable. By default the AntennaState located on the Animal class is never marked immutable, and the AntennaState located on the AnimalState class is always immutable. You may also use the AntennaValue property if you are just trying to pass simple numbers or are organizing a state machine that has more than 10 specific states. |
![]() | RightAntenna | Used to get the position of the RightAntenna. You can also set the position of the RightAntenna if the AntennaState is not set to immutable. By default the AntennaState located on the Animal class is never marked immutable, and the AntennaState located on the AnimalState class is always immutable. You may also use the AntennaValue property if you are just trying to pass simple numbers or are organizing a state machine that has more than 10 specific states. |