|
Player12
An open source football management simulator
|
#include <match_engine.h>
Public Attributes | |
| float | moveX = 0.0f |
| float | moveY = 0.0f |
| bool | sprint = false |
| MatchInputAction | action = MatchInputAction::NONE |
| float | aimX = 0.0f |
| float | aimY = 0.0f |
| float | power = 0.0f |
| bool | jockey = false |
| std::uint8_t | passAssist = 1 |
Controller state for the externally controlled player, e.g. a human's pad in play mode. Directions are in pitch metres (x along the length toward x=105, y across toward y=68); only the direction and a magnitude up to 1 matter.
Shots and passes go through the same execution model as the AI's (the player's technique, pressure, distance and fatigue decide the error), so the stick only chooses where the player tries to play the ball.
| MatchInputAction MatchPlayerInput::action = MatchInputAction::NONE |
Action button, performed at the first step it is possible (carrying the ball for passes, shots and clearances; near the opposing carrier for tackles) or dropped after MatchTuning::Control::ACTION_BUFFER_SECONDS. It fires on the press: holding the same action in later inputs does not repeat it; release (NONE) or a different action re-arms.
| float MatchPlayerInput::aimX = 0.0f |
Pass aim direction; zero aims along the stick (or the facing).
| float MatchPlayerInput::aimY = 0.0f |
| bool MatchPlayerInput::jockey = false |
Jockey (held): the player stays on his feet facing the ball at a contain pace; with the stick idle he holds a goal-side line on the carrier.
| float MatchPlayerInput::moveX = 0.0f |
Stick: run direction, magnitude 0..1 of the run speed (0 = stand).
| float MatchPlayerInput::moveY = 0.0f |
| std::uint8_t MatchPlayerInput::passAssist = 1 |
Pass assistance: 0 plays the pass along the stick, 1 (default) leans toward the best placed team-mate near the aim, 2 picks him in a wide cone.
| float MatchPlayerInput::power = 0.0f |
Strength of the action in [0, 1] from how long its button was held: the shot's pace (a full bar also lifts and widens it), or how far ahead a through ball or a pass into space is played. 0 lets the player choose.
| bool MatchPlayerInput::sprint = false |
Sprint button: run at top speed instead of the jog share.