dynamic_map_object

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flore

type Flore struct {
	TextureOverFlore string `json:"texture_over_flore"`
	TexturePriority  int    `json:"texture_priority"`
	X                int    `json:"x"`
	Y                int    `json:"y"`
}

type Object

type Object struct {
	// TODO привести тут все в порядок
	// везде где есть приставка Type это оригиналдьные данные типа, все остальное сформированые
	ID                  int    `json:"id"`
	TypeID              int    `json:"type_id"`
	Type                string `json:"type"`
	MapID               int    `json:"map_id"`
	Texture             string `json:"texture"`
	AnimateSpriteSheets string `json:"animate_sprite_sheets"`
	AnimateLoop         bool   `json:"animate_loop"`
	MaxHP               int    `json:"max_hp"`
	TypeMaxHP           int    `json:"-"`
	HP                  int    `json:"hp"`
	Scale               int    `json:"scale"`
	Shadow              bool   `json:"shadow"`
	AnimationSpeed      int    `json:"animation_speed"`
	Priority            int    `json:"priority"`
	TeamID              int    `json:"team_id"`

	TypeXShadowOffset int `json:"-"`
	XShadowOffset     int `json:"x_shadow_offset"`
	TypeYShadowOffset int `json:"-"`
	YShadowOffset     int `json:"y_shadow_offset"`
	ShadowIntensity   int `json:"shadow_intensity"`

	TypeGeoData []*obstacle_point.ObstaclePoint `json:"-"`
	HeightType  float64                         `json:"-"`

	Fraction string `json:"fraction"`

	/* постройка */
	OwnerID          int  `json:"owner_id"` // ид игрока владельца
	Static           bool `json:"-"`
	Weight           int  `json:"weight"`
	Immortal         bool `json:"-"`
	Build            bool `json:"build"`
	DestroyLeftTimer bool `json:"-"`
	DestroyTimer     int  `json:"-"`
	Work             bool `json:"work"`

	CacheJson      []byte `json:"-"`
	CacheGeoData   []byte `json:"-"`
	CreateJsonTime int64  `json:"-"`

	GrowTime int `json:"grow_time"` // говорит время цикла когда растение росло для гладкой отрисовки

	MemoryID int `json:"-"`

	WeaponID      int `json:"weapon_id"`
	XAttach       int `json:"x_attach"`
	YAttach       int `json:"y_attach"`
	MaxEnergy     int `json:"max_energy"`
	CurrentEnergy int `json:"current_energy"`
	ViewRange     int `json:"view_range"`

	Weapons map[int]*body.WeaponSlot `json:"weapons"`
	Run     bool                     `json:"-"`

	ForceTarget *target.Target `json:"-"`
	// contains filtered or unexported fields
}

func (*Object) CalculateScale

func (o *Object) CalculateScale()

func (*Object) CheckViewCoordinate

func (o *Object) CheckViewCoordinate(x, y, radius int) (bool, bool)

func (*Object) CheckVisibleObjectStore

func (o *Object) CheckVisibleObjectStore() bool

func (*Object) GetBurstOfShots

func (o *Object) GetBurstOfShots() *burst_of_shots.BurstOfShots

func (*Object) GetBytes

func (o *Object) GetBytes(mapTime int64) []byte

func (*Object) GetGeoDataBin

func (o *Object) GetGeoDataBin() []byte

func (*Object) GetGunner

func (o *Object) GetGunner() *gunner.Gunner

func (*Object) GetHP

func (o *Object) GetHP() int

func (*Object) GetID

func (o *Object) GetID() int

func (*Object) GetMapHeight

func (o *Object) GetMapHeight() float64

func (*Object) GetOwnerID

func (o *Object) GetOwnerID() int

func (*Object) GetPhysicalModel

func (o *Object) GetPhysicalModel() *physical_model.PhysicalModel

func (*Object) GetPower

func (o *Object) GetPower() int

func (*Object) GetRadarRange

func (o *Object) GetRadarRange() int

func (*Object) GetRangeView

func (o *Object) GetRangeView() int

func (*Object) GetRotate

func (o *Object) GetRotate() float64

func (*Object) GetScale

func (o *Object) GetScale() int

func (*Object) GetTeamID

func (o *Object) GetTeamID() int

func (*Object) GetTurretAmmo

func (o *Object) GetTurretAmmo()

func (*Object) GetUpdateData

func (o *Object) GetUpdateData(mapTime int64) []byte

func (*Object) GetUpdateWeaponTarget

func (o *Object) GetUpdateWeaponTarget() bool

func (*Object) GetWeaponSlot

func (o *Object) GetWeaponSlot(slotNumber int) *body.WeaponSlot

func (*Object) GetWeaponTarget

func (o *Object) GetWeaponTarget() *target.Target

func (*Object) GetX

func (o *Object) GetX() int

func (*Object) GetY

func (o *Object) GetY() int

func (*Object) RangeWeaponSlots

func (o *Object) RangeWeaponSlots() map[int]*body.WeaponSlot

func (*Object) SetGeoData

func (o *Object) SetGeoData()

func (*Object) SetHP

func (o *Object) SetHP(hp int)

func (*Object) SetPower

func (o *Object) SetPower(power int)

func (*Object) SetVisibleObjectStore

func (o *Object) SetVisibleObjectStore(v *visible_objects.VisibleObjectsStore)

func (*Object) SetWeaponTarget

func (o *Object) SetWeaponTarget(target *target.Target)

func (*Object) UnsafeRangeVisibleObjects

func (o *Object) UnsafeRangeVisibleObjects() ([]*visible_objects.VisibleObject, *sync.RWMutex)

func (*Object) UpdatePhysicalModel

func (o *Object) UpdatePhysicalModel()

Jump to

Keyboard shortcuts

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