📄 interceptball.cpp.svn-base
字号:
#include "InterceptBall.h"SoccerCommand InterceptBall::primaryAction(){ /*Log.log( 100, "I am fastest to ball;"); primarySoc = intercept( false ); // intercept the ball if( primarySoc.commandType == CMD_DASH && // if stamina low WM->getAgentStamina().getStamina() < SS->getRecoverDecThr()*SS->getStaminaMax()+200 ) { primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow }// if stamina high*/ return primarySoc; // dash as intended}SoccerCommand InterceptBall::cuncurrentAction(){ return turnNeckToObject( OBJECT_BALL, primarySoc );}void InterceptBall::InterceptDefault(){ Log.log( 100, "I am fastest to ball;"); primarySoc = intercept( false ); // intercept the ball if( primarySoc.commandType == CMD_DASH && // if stamina low WM->getAgentStamina().getStamina() < SS->getRecoverDecThr()*SS->getStaminaMax()+200 ) { primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow }// if stamina high}void InterceptBall::InterceptFast(){ Log.log( 100, "I am fastest to ball;"); primarySoc = intercept( false ); // intercept the ball}void InterceptBall::InterceptSlow(){ Log.log( 100, "I am fastest to ball;"); primarySoc = intercept( false ); // intercept the ball primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -