robot debug 2
This commit is contained in:
parent
b463fd3dfe
commit
d15b1cbc51
@ -242,24 +242,17 @@ function LogicGate_RobotController_Data::createRobot(%this, %obj) {
|
|||||||
|
|
||||||
%obj.luaLogicRobot = %robot;
|
%obj.luaLogicRobot = %robot;
|
||||||
|
|
||||||
lualogic_sendinput(%obj, 1, "P" @ %rpos SPC %obj.getAngleId());
|
schedule(1000, 0, lualogic_sendinput, %obj, 1, "P" @ %rpos SPC %obj.getAngleId());
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogicGate_RobotController_Data::onDeath(%this, %obj) {
|
function LogicGate_RobotController_Data::Logic_onRemove(%this, %obj) {
|
||||||
|
talk("robot remove");
|
||||||
if(isObject(%obj.luaLogicRobot))
|
if(isObject(%obj.luaLogicRobot))
|
||||||
%obj.luaLogicRobot.delete();
|
%obj.luaLogicRobot.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogicGate_RobotController_Data::onRemove(%this, %obj) {
|
function LogicGate_RobotController_Data::Logic_onPlant(%this, %obj) {
|
||||||
if(isObject(%obj.luaLogicRobot))
|
talk("robot plant");
|
||||||
%obj.luaLogicRobot.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
function LogicGate_RobotController_Data::onPlant(%this, %obj) {
|
|
||||||
if(!isObject(%obj.luaLogicRobot))
|
|
||||||
%this.createRobot(%obj);
|
|
||||||
}
|
|
||||||
function LogicGate_RobotController_Data::onLoadPlant(%this, %obj) {
|
|
||||||
if(!isObject(%obj.luaLogicRobot))
|
if(!isObject(%obj.luaLogicRobot))
|
||||||
%this.createRobot(%obj);
|
%this.createRobot(%obj);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user