📄 setplay.h
字号:
#ifndef __SETPLAY_H__
#define __SETPLAY_H__
#include "player.h"
class SetPlayInstance;
const int CP_NumGoalieMovePoint = 6;
/******* Set Play ******************/
class Set_Play{
protected:
int total_roles;
Role roles[SP_team_size];
UNum Executor;
public:
Time Counter;
Set_Play(){total_roles = 0;}
void AddRole(float attackness, float leftness, const Vector& pos);
void AddRole(UNum No, const Vector& pos);
bool IsRole(UNum No);
bool IsExecutor(UNum No);
Vector GetSetPlayPos(UNum No);
Vector GetMySetPlayPos();
bool RecentSeen();
};
class BeforeKickOff : public Set_Play{
private:
Time fill_pos_move_time;
Time fill_pos_turn_time;
bool within_range(Vector& pos);
public:
void set_roles();
void going();
};
class Newsetplay :public Set_Play{
protected:
int total_roles;
Vector BallPos;
float PlayerZoneLength[SP_team_size+1];
float HeadingToBall[SP_team_size+1];
Vector Trackmark[SP_team_size+1];
void CheckHeadingAndStamina();
AngleDeg GetFaceAngle();
bool canshoot;
public:
SP_State curState;
void going();
UNum JudgeExecutor();
bool CanExecute();
bool ShouldAssist();
bool ExecutorGo();
void AssistGo();
void Execute();
};
class GoalieSetPlay : public Set_Play{
private :
public :
int movecount;
Time movetime;
GoalieSetPlay();
float CalcAngle(Vector ATpos,Vector DFpos);
float CalcPoint(Vector pos);
float GetControl(int mynum,int oppnum);
void going();
bool ShouldMove();
bool CanKickOut();
bool KickOut();
AngleDeg MyFaceAngle(Vector pos);
Vector MovePoint[CP_NumGoalieMovePoint];
int deadtime;
float passpriority;
AngleDeg visualrequestangle;
};
class SetPlayInstance{
public:
BeforeKickOff beforekickoff;
GoalieSetPlay goaliesetplay;
Newsetplay newsetplay;
};
#endif //__SETPLAY_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -