Documentation ¶
Index ¶
- func AddNewUser(ws *websocket.Conn, login string, id int)
- func Attack(user *player.Player, msg Message)
- func ChangeSector(user *player.Player, mapID int, coor *coordinate.Coordinate)
- func CheckBaseRespawn(base *base.Base) (bool, *coordinate.Coordinate)
- func CheckTransportCoordinate(x, y, seconds, distCheck, mapID int) bool
- func ClearVisiblePath(mapID int)
- func CreateLine(color string, X, Y, ToX, ToY int, rectSize, mapID int, ms int64)
- func CreateRect(color string, startX, startY int, rectSize, mapID int, ms int64)
- func DebugMoveWorker(user *player.Player)
- func DebugSender()
- func DisconnectUser(user *player.Player, onlyMessage bool)
- func FireGun(user *player.Player, attackUnit *unit.Unit, mp *_map.Map)
- func FlyBullet(user *player.Player, bullet *unit.Bullet, gameMap *_map.Map, ...)
- func FlyLaser(bullet *unit.Bullet, gameMap *_map.Map, attackUnit *unit.Unit)
- func FollowTarget(user *player.Player, followUnit *unit.Unit, mp *_map.Map)
- func FollowUnit(user *player.Player, moveUnit *unit.Unit, msg Message)
- func ForceEvacuation(unit *unit.Unit, x, y, seconds, distCheck int)
- func FormationInit(user *player.Player, unitsID []int) bool
- func FormationMove(user *player.Player)
- func GetPlaceCoordinate(placeUnit *unit.Unit, mp *_map.Map)
- func GetPlaceSquad(user *player.Player, mp *_map.Map)
- func GunWorker(user *player.Player)
- func HandlerParse(user *player.Player, coor *coordinate.Coordinate)
- func IntoToBase(user *player.Player, baseID int)
- func LoadGame(user *player.Player, msg Message)
- func Mining(miner *unit.Unit, miningEquip *equip.Equip, reservoir *resource.Map, ...)
- func Move(user *player.Player, msg Message, newAction bool)
- func MoveGlobalUnit(msg Message, user *player.Player, path *[]*unit.PathUnit, moveUnit *unit.Unit, ...)
- func MoveGlobalUnitEnd(user *player.Player, moveUnit *unit.Unit, moveRepeat bool, msg Message)
- func MoveSender()
- func NewFormationPos(user *player.Player, msg Message)
- func OutBase(base *base.Base) *coordinate.Coordinate
- func PolygonSender()
- func RadarWorker(user *player.Player, mp *_map.Map)
- func Reader(ws *websocket.Conn, user *player.Player)
- func RecoveryPowerWorker(user *player.Player)
- func ReturnUnit(user *player.Player, moveUnit *unit.Unit)
- func RotateGun(user *player.Player, rotateUnit *unit.Unit, tickTime int)
- func SelectEquip(user *player.Player, msg Message)
- func SendMessage(msg Message)
- func SquadDamage(user *player.Player, damage int, damageUnit *unit.Unit)
- func WeaponFirePos()
- type Cloud
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeSector ¶
func ChangeSector(user *player.Player, mapID int, coor *coordinate.Coordinate)
func CheckBaseRespawn ¶
func CheckBaseRespawn(base *base.Base) (bool, *coordinate.Coordinate)
func ClearVisiblePath ¶
func ClearVisiblePath(mapID int)
func DebugMoveWorker ¶
func DebugSender ¶
func DebugSender()
func DisconnectUser ¶
func ForceEvacuation ¶
func FormationMove ¶
func GetPlaceCoordinate ¶
func GetPlaceSquad ¶
func GunWorker ¶
функция следит за орудиями всех юнитов если есть цель то орудие всегда повернуто к цели, и функция следит что бы оно так и было независимо от движения если цели нет то орудие всегда идет по курсу тела todo расчет угла по движещейся цели
func HandlerParse ¶
func HandlerParse(user *player.Player, coor *coordinate.Coordinate)
func IntoToBase ¶
func MoveGlobalUnit ¶
func MoveGlobalUnitEnd ¶
func MoveSender ¶
func MoveSender()
func NewFormationPos ¶
func OutBase ¶
func OutBase(base *base.Base) *coordinate.Coordinate
func PolygonSender ¶
func PolygonSender()
func RadarWorker ¶
func RecoveryPowerWorker ¶
TODO отключить игрока если он отключился
func SelectEquip ¶
func SendMessage ¶
func SendMessage(msg Message)
func WeaponFirePos ¶
func WeaponFirePos()
Types ¶
type Message ¶
type Message struct { // когда я забил х на эту структуру данных а теперь тут какое то адище IDSender int // переменная не для данных а для отсылки сообщений IDUserSend int // переменная не для данных а для отсылки сообщений IDMap int // переменная не для данных а для отсылки сообщений Event string `json:"event"` Map *_map.Map `json:"map"` Error string `json:"error"` Squad *squad.Squad `json:"squad"` User *player.Player `json:"user"` Bases map[int]*base.Base `json:"bases"` X int `json:"x"` Y int `json:"y"` ToX float64 `json:"to_x"` ToY float64 `json:"to_y"` Bullet *unit.Bullet `json:"bullet"` PathUnit *unit.PathUnit `json:"path_unit"` Path []*unit.PathUnit `json:"path"` BaseID int `json:"base_id"` OtherUser *player.ShortUserInfo `json:"other_user"` OtherUsers []*player.ShortUserInfo `json:"other_users"` ThrowItems []inventory.Slot `json:"throw_items"` Boxes []*boxInMap.Box `json:"boxes"` Box *boxInMap.Box `json:"box"` BoxID int `json:"box_id"` ToBoxID int `json:"to_box_id"` TypeSlot int `json:"type_slot"` Name string `json:"name"` Slot int `json:"slot"` Slots []int `json:"slots"` Size float32 `json:"size"` Inventory *inventory.Inventory `json:"inventory"` InventorySlot int `json:"inventory_slot"` TransportID int `json:"transport_id"` ThoriumSlots map[int]*detail.ThoriumSlot `json:"thorium_slots"` ThoriumSlot int `json:"thorium_slot"` Afterburner bool `json:"afterburner"` Credits int `json:"credits"` Experience int `json:"experience"` Seconds int `json:"seconds"` Count int `json:"count"` Coordinates []*coordinate.Coordinate `json:"coordinates"` Radius int `json:"radius"` Anomalies []globalGame.VisibleAnomaly `json:"anomalies"` Anomaly *_map.Anomalies `json:"anomaly"` DynamicObject *dynamic_map_object.Object `json:"dynamic_object"` DynamicObjects map[int]map[int]*dynamic_map_object.Object `json:"dynamic_objects"` BoxPassword int `json:"box_password"` Reservoir *resource.Map `json:"reservoir"` Cloud *Cloud `json:"cloud"` ToSquadID string `json:"to_squad_id"` Bot bool `json:"bot"` MapID int `json:"map_id"` Missions map[string]*mission.Mission `json:"missions"` MissionUUID string `json:"mission_uuid"` UnitsID []int `json:"units_id"` ShortUnits map[int]*unit.ShortUnitInfo `json:"short_units"` ShortUnit *unit.ShortUnitInfo `json:"short_unit"` Unit *unit.Unit `json:"unit"` UnitID int `json:"unit_id"` Equip *detail.BodyEquipSlot `json:"equip"` Weapon *detail.Weapon `json:"weapon"` HighGravity bool `json:"high_gravity"` Type string `json:"type"` Color string `json:"color"` RectSize int `json:"rect_size"` Polygon collisions.Polygon `json:"polygon"` NeedCheckView bool `json:"-"` // если тру то надо проверить сообщение на дальность видимости/радара RadarMark *squad.VisibleObjects `json:"radar_mark"` ActionObject string `json:"action_object"` // удалить/создать обьект ActionMark string `json:"action_mark"` // удалить/создать/скрыть/раскрыть метку Object interface{} `json:"object"` // обьект (ящик, транспорт, юнит и тд) }
Source Files ¶
- afterburner_toggle.go
- attack.go
- check_transport_coordinate.go
- digger.go
- disconnect_user.go
- evacuation.go
- fly_bullet.go
- follow_unit.go
- formation.go
- formation_move.go
- gun_worker.go
- handlers.go
- load_game.go
- mining.go
- move.go
- move_debug.go
- place_unit.go
- pool.go
- power_recovery.go
- radar.go
- select_equip.go
- squad_damage.go
- thorium.go
- throw_items.go
- use_box.go
Click to show internal directories.
Click to hide internal directories.