Documentation ¶
Index ¶
- type Squad
- func (s *Squad) AddVisibleObject(newObj *VisibleObjects)
- func (s *Squad) CheckViewCoordinate(x, y int) (bool, bool)
- func (s *Squad) GetFormationCoordinate(x, y int) (int, int)
- func (s *Squad) GetShortUnits() map[int]*unit.ShortUnitInfo
- func (s *Squad) GetUnitByID(id int) *unit.Unit
- func (s *Squad) GetVisibleObjectByID(id string) *VisibleObjects
- func (s *Squad) RadarLock()
- func (s *Squad) RadarUnlock()
- func (s *Squad) RemoveVisibleObject(removeObj *VisibleObjects)
- func (s *Squad) UpdateLock()
- func (s *Squad) UpdateUnlock()
- type VisibleObjects
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Squad ¶
type Squad struct { ID int `json:"id"` Name string `json:"name"` Active bool `json:"active"` MatherShip *unit.Unit `json:"mather_ship"` InGame bool `json:"in_game"` BaseID int `json:"base_id"` /* если отряд не у игрока то он храниться на этой базе */ SoftTransition bool `json:"soft_transition"` VisibleObjects map[string]*VisibleObjects `json:"-"` // key id_object+type_object /* необходимые флаги что бы обеспечить правильную перегрзку методов воркеров*/ RecoveryPowerWork bool `json:"-"` RecoveryPowerExit bool `json:"-"` GunWorkerWork bool `json:"-"` GunWorkerExit bool `json:"-"` RadarWorkerWork bool `json:"-"` RadarWorkerExit bool `json:"-"` // contains filtered or unexported fields }
func (*Squad) AddVisibleObject ¶
func (s *Squad) AddVisibleObject(newObj *VisibleObjects)
func (*Squad) GetShortUnits ¶
func (s *Squad) GetShortUnits() map[int]*unit.ShortUnitInfo
func (*Squad) GetVisibleObjectByID ¶
func (s *Squad) GetVisibleObjectByID(id string) *VisibleObjects
func (*Squad) RadarUnlock ¶
func (s *Squad) RadarUnlock()
func (*Squad) RemoveVisibleObject ¶
func (s *Squad) RemoveVisibleObject(removeObj *VisibleObjects)
func (*Squad) UpdateLock ¶
func (s *Squad) UpdateLock()
func (*Squad) UpdateUnlock ¶
func (s *Squad) UpdateUnlock()
type VisibleObjects ¶
type VisibleObjects struct { IDObject int `json:"id_object"` TypeObject string `json:"type_object"` UUID string `json:"uuid"` View bool `json:"view"` // в прямой видимости Radar bool `json:"radar"` // видим только радаром Type string `json:"type"` // fly(летающий), ground(наземный), structure(структура), resource(ресурс) Update bool `json:"update"` }
Click to show internal directories.
Click to hide internal directories.