C4 Engine
C4 Engine API Documentation

Controller::ValidNode

Defined in:  C4Controller.h
Returns a boolean value indicating whether the controller can be assigned to a particular node.
Prototype

static bool ValidNode(const Node *node);

Description
The ValidNode function should be redefined by controller subclasses. Its implementation should examine the node pointed to by the node parameter and return true if the controller type can be used with the node. If the controller type cannot be used, the ValidNode function should return false. If the ValidNode function is not redefined for a registered subclass of the Controller class, then that controller type can be assigned to any node.