代码语言:javascript 复制 function Start(block) gameObj = javaObject('millerek.lafayette.edu.Game'); %set up game gameObj.main(""); %end Start function Update(block) X = block.InputPort(1).Data(1,1); Y = block.InputPort(1).Data(2,1); javaMethod('getMdlValues',gameObj,X,Y); ...
代码语言:javascript 复制 function Start(block) gameObj = javaObject('millerek.lafayette.edu.Game'); %set up game gameObj.main(""); %end Start function Update(block) X = block.InputPort(1).Data(1,1); Y = block.InputPort(1).Data(2,1); javaMethod('getMdlValues',gameObj,X,Y); ...