michael.zhang Posted August 25, 2011 Share 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. Link to comment
Guest anet Posted August 26, 2011 Share 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); Link to comment
michael.zhang Posted August 26, 2011 Author Share Posted August 26, 2011 It was my mistake :-p I failed to disambiguate between my custom Controls class from the unigine Controls class. Link to comment
Recommended Posts