FiringRange struct
#include <Jazz2/Editor/Shell/WeaponPreview.h>
The firing range the preview of a weapon shows.
The player fires from the muzzle towards the target, the floor is below, the ceiling above and a wall on the right. All in pixels of the level.
Public static variables
- static float FloorY constexpr
- Height of the floor.
- static float CeilingY constexpr
- Height of the ceiling.
- static float WallX constexpr
- Distance of the wall.
-
static std::
int32_t MaxFrames constexpr - Most frames of a shot that are simulated.
Public functions
- auto GetTarget() const -> Rectf
- Returns the target.
- auto operator==(const FiringRange& other) const -> bool
Public variables
- Vector2f Muzzle
- Muzzle of the gun of the player.
- Vector2f Target
- Where the target stands, the middle of its bottom.
- bool FacingLeft
- Whether the player faces to the left.