|
Player12
An open source football management simulator
|
#include <match_engine.h>
One on-pitch slot. position, basePosition and movementTarget are normalised pitch coordinates; velocity is in metres per second (x along the length, y across the width). facingAngle is the heading in normalised pitch space, as renderers expect.
| float MatchPlayer::acceleration = MatchTuning::Player::ACCELERATION_BASE |
| float MatchPlayer::actionCooldown = 0.0f |
| Vector2F MatchPlayer::basePosition {MatchTuning::Pitch::CENTRE, MatchTuning::Pitch::CENTRE} |
| float MatchPlayer::braking = MatchTuning::Player::BRAKING_BASE |
| float MatchPlayer::defending = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::diveTimer = 0.0f |
| float MatchPlayer::dribbling = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::endurance = MatchTuning::Player::DEFAULT_ATTRIBUTE |
Stamina attribute (endurance); stamina above is the live condition.
| float MatchPlayer::facingAngle = 0.0f |
| std::int8_t MatchPlayer::formationSlot = -1 |
Outfield slot of the side's formation (see MatchEngine::getFormation); -1 for the starting goalkeeper. Ignored while keeping goal.
| float MatchPlayer::goalkeeping = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::heightMetres = MatchTuning::Units::DEFAULT_PLAYER_HEIGHT_METRES |
| PlayerIntent MatchPlayer::intent = PlayerIntent::HOLD_SHAPE |
| bool MatchPlayer::isDiving = false |
| bool MatchPlayer::isGoalkeeper = false |
Goalkeeper duties (the natural keeper, or an emergency replacement).
| bool MatchPlayer::isHomeTeam = false |
| bool MatchPlayer::isInjured = false |
| bool MatchPlayer::isMakingRun = false |
| bool MatchPlayer::isPressing = false |
| bool MatchPlayer::isSprinting = false |
| bool MatchPlayer::isTrapping = false |
| float MatchPlayer::maxSpeed = MatchTuning::Player::TOP_SPEED_BASE |
Fresh top speed (m/s), maximum acceleration A0 and braking (m/s^2).
| Vector2F MatchPlayer::movementTarget |
| bool MatchPlayer::onPitch = true |
False once sent off or forced off injured with no substitute left.
| float MatchPlayer::pace = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::passing = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::physicality = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| const Player* MatchPlayer::player = nullptr |
| Vector2F MatchPlayer::position {MatchTuning::Pitch::CENTRE, MatchTuning::Pitch::CENTRE} |
| float MatchPlayer::shooting = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| float MatchPlayer::sprintReserve = 1.0f |
Fast repeat-sprint reserve in [0, 1].
| float MatchPlayer::stamina = 1.0f |
Slow energy pool (match condition) in [MINIMUM_STAMINA, 1].
| std::size_t MatchPlayer::statsIndex = 0 |
Index into MatchEngine::getPlayerStats() for the current occupant.
| float MatchPlayer::tackleCooldown = 0.0f |
| Vector2F MatchPlayer::tacticalTarget |
Latest tactical target (refreshed at the tactical rate) and whether it is chased urgently.
| float MatchPlayer::targetAngle = 0.0f |
| float MatchPlayer::trapTimer = 0.0f |
| float MatchPlayer::turnRate = MatchTuning::Player::FACING_TURN_RATE_RADIANS |
| bool MatchPlayer::urgentMovement = false |
| Vector2F MatchPlayer::velocity {0.0f, 0.0f} |
| float MatchPlayer::vision = MatchTuning::Player::DEFAULT_ATTRIBUTE |
| int MatchPlayer::yellowCards = 0 |