KO
games/rob-revisited / src / Revisited / Land / Intent.php · commit f9a1307
<?phpnamespace App\Revisited\Land;/** What the player wants this frame (the scene fills it from the keys, the pad, the touches). */final class Intent{    public float $forward = 0.0;   // -1 back .. 1 forward    public float $turn = 0.0;      // -1 left .. 1 right    public float $strafe = 0.0;    public float $look = 0.0;      // -1 down .. 1 up    public bool $run = false;    public bool $crouch = false;    public bool $attack = false;    /** the left hand's action: brandish the torch / strike with the left item */    public bool $left = false;    /** pressed this frame: a jump (ignored in the water, crouched or in the air) */    public bool $jump = false;    /** combat mode: the camera may ease toward the target (the scene: true while the mouse / finger does not look) */    public bool $assist = false;    /** pressed this frame: a dodge (combat mode: the jump key; -1 left, 1 right, 0 back), null: none */    public ?float $dodge = null;}