move

package
v0.0.0-...-54eea7a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExit

func CheckExit(user *player.Player, moveUnit *unit.Unit, path *[]*unit.PathUnit, i, countExit *int, followTarget bool) bool

func CreatePath

func CreatePath(pathPoints []*coordinate.Coordinate, startX, startY, maxSpeed float64, moveUnit *unit.Unit, unitRotate int, units map[int]*unit.ShortUnitInfo) []*unit.PathUnit

func GetGravity

func GetGravity(x, y, mapID int) bool

func GetUnitPos

func GetUnitPos(unitsID []int, user *player.Player, toX, toY float64) []*coordinate.Coordinate

func LaunchEvacuation

func LaunchEvacuation(unit *unit.Unit, mp *_map.Map) ([]*unit.PathUnit, int, *base.Transport, error)

func ReturnEvacuation

func ReturnEvacuation(unit *unit.Unit, mp *_map.Map, baseID int, transport *base.Transport) []*unit.PathUnit

func RotateUnit

func RotateUnit(unitRotate, needRotate *int, step int) int

func SetPosition

func SetPosition(moveUnit *unit.Unit, pathUnit *unit.PathUnit, deltaTime int64)

func StopMove

func StopMove(moveUnit *unit.Unit, resetSpeed bool)

func To

func To(forecastX, forecastY, maxSpeed, minSpeed, speed, ToX, ToY float64, rotate, rotateAngle int, ms int) (error, []*unit.PathUnit)

func Unit

func Unit(moveUnit *unit.Unit, ToX, ToY, StartX, StartY float64, unitRotate int, uuid string,
	units map[int]*unit.ShortUnitInfo, unitsID []int) ([]*unit.PathUnit, error)

func UnitTo

func UnitTo(forecastX, forecastY, speed, ToX, ToY float64, rotate, rotateAngle, ms int, searchCollision, onlyRotate, start bool,
	mp *_map.Map, moveUnit *unit.Unit, units map[int]*unit.ShortUnitInfo) ([]*unit.PathUnit, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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