/* Reports a success if the child fails and * a failure if the child succeeds. Running will report * as running */ public override CandiceBehaviorStates Evaluate() { switch (m_node.Evaluate()) { case CandiceBehaviorStates.FAILURE: m_nodeState = CandiceBehaviorStates.SUCCESS; return(m_nodeState); case CandiceBehaviorStates.SUCCESS: m_nodeState = CandiceBehaviorStates.FAILURE; return(m_nodeState); case CandiceBehaviorStates.RUNNING: m_nodeState = CandiceBehaviorStates.RUNNING; return(m_nodeState); } m_nodeState = CandiceBehaviorStates.SUCCESS; return(m_nodeState); }