body

package
v0.0.0-...-71ffa5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	ID            int                 `json:"id"`
	Name          string              `json:"name"`
	Texture       string              `json:"texture"`
	MaxHP         int                 `json:"max_hp"`
	Scale         int                 `json:"scale"`
	Length        int                 `json:"length"`
	Width         int                 `json:"width"`
	Height        int                 `json:"height"`
	Radius        int                 `json:"radius"`
	RangeView     int                 `json:"range_view"`
	RangeRadar    int                 `json:"range_radar"`
	Weapons       map[int]*WeaponSlot `json:"weapons"`
	ChassisType   string              `json:"chassis_type"`
	Speed         float64             `json:"speed"`
	ReverseSpeed  float64             `json:"-"`
	PowerFactor   float64             `json:"power_factor"`
	ReverseFactor float64             `json:"-"`
	TurnSpeed     float64             `json:"turn_speed"`
	MoveDrag      float64             `json:"move_drag"`
	AngularDrag   float64             `json:"-"`
	Weight        float64             `json:"-"`
}

type WeaponSlot

type WeaponSlot struct {
	ID                  int            `json:"-"`
	AmmoID              int            `json:"-"`
	Number              int            `json:"number"`
	Weapon              *weapon.Weapon `json:"weapon"`
	Ammo                *ammo.Ammo     `json:"ammo"`
	AmmoQuantity        int            `json:"ammo_quantity"`
	XAttach             int            `json:"x_attach"`
	YAttach             int            `json:"y_attach"`
	RealXAttach         int            `json:"real_x_attach"`
	RealYAttach         int            `json:"real_y_attach"`
	XAnchor             float64        `json:"x_anchor"`
	YAnchor             float64        `json:"y_anchor"`
	Reload              bool           `json:"reload"`
	AmmoReload          bool           `json:"-"`
	GunRotate           float64        `json:"gun_rotate"`
	TimeReload          int            `json:"time_reload"`
	CurrentReload       int            `json:"current_reload"`
	AccumulationCurrent float64        `json:"-"` // 0-100, от этого зависит урон
	AccumulationTimeOut int            `json:"-"`

	StartReloadTime int64 `json:"-"`
	EndReloadTime   int64 `json:"-"`
	// contains filtered or unexported fields
}

func (*WeaponSlot) GetAmmo

func (s *WeaponSlot) GetAmmo() *ammo.Ammo

func (*WeaponSlot) GetAmmoQuantity

func (s *WeaponSlot) GetAmmoQuantity() int

func (*WeaponSlot) GetCurrentReload

func (s *WeaponSlot) GetCurrentReload() int

func (*WeaponSlot) GetGunRotate

func (s *WeaponSlot) GetGunRotate() float64

func (*WeaponSlot) GetLastFirePosition

func (s *WeaponSlot) GetLastFirePosition() int

func (*WeaponSlot) GetRealXAttach

func (s *WeaponSlot) GetRealXAttach() int

func (*WeaponSlot) GetRealYAttach

func (s *WeaponSlot) GetRealYAttach() int

func (*WeaponSlot) GetReload

func (s *WeaponSlot) GetReload() bool

func (*WeaponSlot) GetXAnchor

func (s *WeaponSlot) GetXAnchor() float64

func (*WeaponSlot) GetYAnchor

func (s *WeaponSlot) GetYAnchor() float64

func (*WeaponSlot) NextLastFirePosition

func (s *WeaponSlot) NextLastFirePosition()

func (*WeaponSlot) SetAmmo

func (s *WeaponSlot) SetAmmo(ammo *ammo.Ammo)

func (*WeaponSlot) SetAmmoQuantity

func (s *WeaponSlot) SetAmmoQuantity(quantity int)

func (*WeaponSlot) SetAnchor

func (s *WeaponSlot) SetAnchor()

func (*WeaponSlot) SetCurrentReload

func (s *WeaponSlot) SetCurrentReload(time int)

func (*WeaponSlot) SetGunRotate

func (s *WeaponSlot) SetGunRotate(rotate float64)

func (*WeaponSlot) SetReload

func (s *WeaponSlot) SetReload(reload bool)

func (*WeaponSlot) StartReload

func (s *WeaponSlot) StartReload(reloadTime int, ammoReload bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL