Documentation
¶
Index ¶
- func GetDataFromUrl(url string) ([]byte, error)
- func MapIdentity(host string) (uint32, error)
- type Damage
- type Entity
- type Event
- type HudMsg
- type Indicators
- type MapInfo
- func (m *MapInfo) GetDistance(x1, y1, x2, y2 float64) float64
- func (m *MapInfo) GetSpeed(x1, y1, x2, y2 float64, duration time.Duration) float64
- func (m *MapInfo) GetSpeedKmh(x1, y1, x2, y2 float64, duration time.Duration) float64
- func (m *MapInfo) IsValid() bool
- func (m *MapInfo) Load(host string) error
- func (m *MapInfo) Unmarshal(jsonBytes []byte) error
- type MapObj
- func (mapObj *MapObj) GetAircrafts() *[]Entity
- func (mapObj *MapObj) GetAircraftsByColors(colors *[]string) *[]Entity
- func (mapObj *MapObj) GetAirfields() *[]Entity
- func (mapObj *MapObj) GetCaptureZones() *[]Entity
- func (mapObj *MapObj) GetDistance(ent1 *Entity, ent2 *Entity, mapInfo *MapInfo) float64
- func (mapObj *MapObj) GetFighterRespawnBases() *[]Entity
- func (mapObj *MapObj) GetGroundUnitsByColors(colors *[]string) *[]Entity
- func (mapObj *MapObj) GetHeading(ent1 *Entity, ent2 *Entity) float64
- func (mapObj *MapObj) GetPlayerEntity() *Entity
- func (mapObj *MapObj) GetTankRespawnBases() *[]Entity
- func (mapObj *MapObj) GetTanks() *[]Entity
- func (mapObj *MapObj) Load(host string) error
- func (mapObj *MapObj) Unmarshal(jsonBytes []byte) error
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataFromUrl ¶
func MapIdentity ¶
Types ¶
type Entity ¶
type Entity struct {
Type string `json:"type"`
Color string `json:"color"`
ColorRGB []int `json:"color[]"`
Blink int `json:"blink"`
Icon string `json:"icon"`
IconBG string `json:"icon_bg"`
X float64 `json:"x"`
Y float64 `json:"y"`
Dx float64 `json:"dx"`
Dy float64 `json:"dy"`
Sx float64 `json:"sx"`
Sy float64 `json:"sy"`
Ex float64 `json:"ex"`
Ey float64 `json:"ey"`
}
type HudMsg ¶
func (*HudMsg) GetLastDmg ¶
type Indicators ¶
type Indicators struct {
Valid bool `json:"valid"`
Army string `json:"army"`
Type string `json:"type"`
Speed float64 `json:"speed"`
Pedals1 float64 `json:"pedals1"`
Pedals2 float64 `json:"pedals2"`
Pedals3 float64 `json:"pedals3"`
Pedals4 float64 `json:"pedals4"`
StickElevator float64 `json:"stick_elevator"`
StickAilerons float64 `json:"stick_ailerons"`
Vario float64 `json:"vario"`
AltitudeHour float64 `json:"altitude_hour"`
AltitudeMin float64 `json:"altitude_min"`
Altitude10K float64 `json:"altitude_10k"`
Altitude1Hour float64 `json:"altitude1_hour"`
Altitude1Min float64 `json:"altitude1_min"`
Altitude1100 float64 `json:"altitude1_10k"`
AviahorizonRoll float64 `json:"aviahorizon_roll"`
AviahorizonPitch float64 `json:"aviahorizon_pitch"`
Bank float64 `json:"bank"`
Bank2 float64 `json:"bank2"`
Turn float64 `json:"turn"`
Compass1 float64 `json:"compass1"`
Compass2 float64 `json:"compass2"`
ClockHour float64 `json:"clock_hour"`
ClockMin float64 `json:"clock_min"`
ClockSec float64 `json:"clock_sec"`
ManifoldPressure float64 `json:"manifold_pressure"`
RpmMin float64 `json:"rpm_min"`
RpmHour float64 `json:"rpm_hour"`
OilPressure float64 `json:"oil_pressure"`
OilPressure1 float64 `json:"oil_pressure1"`
OilTemperature float64 `json:"oil_temperature"`
HeadTemperature float64 `json:"head_temperature"`
Mixture float64 `json:"mixture"`
CarbTemperature float64 `json:"carb_temperature"`
Fuel1 float64 `json:"fuel1"`
FuelPressure float64 `json:"fuel_pressure"`
Gears float64 `json:"gears"`
Gears1 float64 `json:"gears1"`
Flaps float64 `json:"flaps"`
Throttle float64 `json:"throttle"`
Weapon2 float64 `json:"weapon2"`
Weapon3 float64 `json:"weapon3"`
Weapon4 float64 `json:"weapon4"`
PropPitch float64 `json:"prop_pitch"`
Supercharger float64 `json:"supercharger"`
FlapsIndicator float64 `json:"flaps_indicator"`
GearLIndicator float64 `json:"gear_l_indicator"`
GearRIndicator float64 `json:"gear_r_indicator"`
GearCIndicator float64 `json:"gear_c_indicator"`
GMeter float64 `json:"g_meter"`
GMeterMin float64 `json:"g_meter_min"`
GMeterMax float64 `json:"g_meter_max"`
Blister1 float64 `json:"blister1"`
Blister2 float64 `json:"blister2"`
}
func (*Indicators) IsValid ¶
func (indicators *Indicators) IsValid() bool
func (*Indicators) Load ¶
func (s *Indicators) Load(host string) error
func (*Indicators) Unmarshal ¶
func (indicators *Indicators) Unmarshal(jsonBytes []byte) error
type MapInfo ¶
type MapInfo struct {
Valid bool `json:"valid"`
GridSize []float64 `json:"grid_size"`
GridSteps []float64 `json:"grid_steps"`
GridZero []float64 `json:"grid_zero"`
HudType int `json:"hud_type"`
MapGeneration int `json:"map_generation"`
MapMax []float64 `json:"map_max"`
MapMin []float64 `json:"map_min"`
}
func (*MapInfo) GetDistance ¶
func (*MapInfo) GetSpeedKmh ¶
type MapObj ¶
type MapObj []Entity
func (*MapObj) GetAircrafts ¶
func (*MapObj) GetAircraftsByColors ¶
func (*MapObj) GetAirfields ¶
func (*MapObj) GetCaptureZones ¶
func (*MapObj) GetDistance ¶
func (*MapObj) GetFighterRespawnBases ¶
func (*MapObj) GetGroundUnitsByColors ¶
func (*MapObj) GetPlayerEntity ¶
func (*MapObj) GetTankRespawnBases ¶
Click to show internal directories.
Click to hide internal directories.