CustomEvent MembersRobocode Robot API for .NET

The CustomEvent type exposes the following members.
Constructors

  NameDescription
Public methodCustomEvent(Condition)
Called by the game to create a new CustomEvent when a condition is met.
Public methodCustomEvent(Condition, Int32)
Called by the game to create a new CustomEvent when a condition is met. The event will have the given priority. An event priority is a value from 0 - 99. The higher value, the higher priority. The default priority is 80.

This is equivalent to calling Priority on the Condition.
Back to Top
Methods

  NameDescription
Public methodCompareTo (Overrides Event CompareTo(Event).)
Back to Top
Properties

  NameDescription
Public propertyCondition
Returns the condition that fired, causing this event to be generated. Use this to determine which condition fired, and to remove the custom event.
Examples

public void OnCustomEvent(CustomEvent evnt)
{
    if (event.Condition.Name == "mycondition")
    {
        RemoveCustomEvent(event.Condition);
        // do something else
    }
}
Public propertyPriority (Overrides Event Priority.)
Public propertyTime
The time when this event occurred.
(Inherited from Event.)
Back to Top
See Also