IAdvancedRobotPeer AddCustomEvent Method Robocode Robot API for .NET
Registers a custom event to be called when a condition is met. When you are finished with your condition or just want to remove it you must call RemoveCustomEvent(Condition).

Examples

AddCustomEvent(
    new Condition("triggerhit", (c) =>
    {
       return Energy <= trigger;
    }));

// Add our custom event based on our condition
AddCustomEvent(triggerHitCondition);

Namespace: Robocode.RobotInterfaces.Peer
Assembly: robocode (in robocode.dll) Version: 1.9.3.0
Syntax

void AddCustomEvent(
	Condition condition
)
See Also