📄 freemarkpos.cpp.svn-base
字号:
#include "FreeMarkPos.h"SoccerCommand FreeMarkPos::primaryAction(){ oponnent = WM->getClosestInSetTo( OBJECT_SET_OPPONENTS,WM->getAgentObjectType() ); distRelOpon = WM->getRelativeDistance( oponnent ); distRelBall = WM->getRelativeDistance( OBJECT_BALL ); if( distRelOpon < distRelBall ) { posRelOpon = WM->getRelativePosition( oponnent ); posRelBall = WM->getRelativePosition( OBJECT_BALL ); aux = posRelBall.operator *(posRelOpon); angulo = (acos(aux.modulo(aux)/(distRelBall*distRelOpon)))*180/3.14159; if( angulo < 30 ) { if( posRelOpon.modulo(posRelOpon) < 10 ) { if(WM->getAgentGlobalPosition().getX() > WM->getGlobalPosition(OBJECT_BALL).getX() + 10) { aux= WM->getAgentGlobalPosition(); aux=(posRelBall.operator *( 0.5 ).operator +((posRelBall.operator *( 0.5 )).normal(posRelBall))).operator - (aux); return moveToPos( aux , PS->getPlayerWhenToTurnAngle() ); } } }// else// {// if( WM->getAgentStamina().getStamina() > SS->getRecoverDecThr()*SS->getStaminaMax()+800 )// {// moveToPos( (WM->getBallPos() - WM->getAgentGlobalPosition())/20 + WM->getStrategicPosition(), PS->getPlayerWhenToTurnAngle() );// }// } }}SoccerCommand FreeMarkPos::cuncurrentAction(){ return turnNeckToPoint( OBJECT_BALL , primarySoc );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -