📄 spadestest.rb
字号:
importBundle "filesystemstd"importBundle "sexpparser"importBundle "monitortest"importBundle "perfectvisionperceptor"importBundle "forceeffector"# import plugins specific to the soccer simulationimportBundle "soccer"## Init## mount a standard file systemfileServer = get('/sys/server/file');fileServer.mount('FileSystemSTD', 'data/');# setup the PhysicsServernew('kerosin/PhysicsServer', '/sys/server/physics');# setup the SceneServersceneServer = new('kerosin/SceneServer', '/sys/server/scene');sceneServer.createScene('/usr/scene');# setup the MonitorServer and a simple MonitorSystemmonitorServer = new('oxygen/MonitorServer', '/sys/server/monitor');monitorServer.registerMonitorSystem('MonitorTest');# setup the GameControlServergameControlServer = new('oxygen/GameControlServer', '/sys/server/gamecontrol');gameControlServer.initParser('SexpParser');gameControlServer.initEffector('CreateEffector');# setup the SpadesServerspadesServer = new('oxygen/SpadesServer', '/sys/server/spades');# set the time of a single simulation stepSpades.TimePerStep = 0.01# # Scene setup## create world and space aspectsworld = new('kerosin/World', '/usr/scene/_world');world.setGravity(0.0, -9.81, 0.0);new('kerosin/Space', '/usr/scene/_space');# setup all arena colliders# floor colliderpc = new('kerosin/PlaneCollider', '/usr/scene/pc');pc.setParams(0.0, 1.0 ,0.0, 0.0); # wall colliderw1 = new('kerosin/PlaneCollider', '/usr/scene/w1');w1.setParams(-1.0, 0.0, 0.0, -25.0);w2 = new('kerosin/PlaneCollider', '/usr/scene/w2');w2.setParams(1.0, 0.0, 0.0, -25.0);w3 = new('kerosin/PlaneCollider', '/usr/scene/w3');w3.setParams(0.0, 0.0, -1.0, -25.0);w4 = new('kerosin/PlaneCollider', '/usr/scene/w4');w4.setParams(0.0, 0.0, 1.0, -25.0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -