michael.zhang Posted August 25, 2011 Posted August 25, 2011 // functional ControlsDummy controls = actor.getControls(); controls.setState(CONTROLS_STATE_FORWARD, 1); // Interpreter::parse_user_class(): unknown "Controls" class member "setState" Controls controls = actor.getControls(); controls.setState(CONTROLS_STATE_FORWARD, 1); Documentation suggests that setState is a method of Controls, and would be inherited by ControlsDummy. Behavior suggests otherwise.
Guest anet Posted August 26, 2011 Posted August 26, 2011 Sorry, we could not reproduce this issue. For example, this piece of code works fine: actor = new PlayerActor(); Controls controls = actor.getControls(); if(controls == NULL) { log.message("Controls are NULL\n"); } else { log.message("typeof(controls) = %s\n",typeof(controls)); } controls.setState(CONTROLS_STATE_FORWARD,1);
michael.zhang Posted August 26, 2011 Author Posted August 26, 2011 It was my mistake :-p I failed to disambiguate between my custom Controls class from the unigine Controls class.
Recommended Posts