level

package
v0.0.0-...-157546e Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GoalPosition = geom.Vec3{
		X: logic.MapWidth / 2,
		Y: 1,
		Z: logic.MapDepth * 0.05,
	}
	StartPlayerPosition = geom.Vec3{
		X: logic.MapWidth / 2,
		Y: 1,
		Z: logic.MapDepth * 0.1,
	}
	StartAgentPosition = geom.Vec3{
		X: logic.MapWidth / 2,
		Y: 1,
		Z: logic.MapDepth * 0.9,
	}
)

Positions

View Source
var (
	LevelsTime = []uint64{
		0: logic.TPS * 60 * 5,
		1: logic.TPS * 60 * 5,
		2: logic.TPS * 60 * 5,
		3: logic.TPS * 60 * 5,
	}

	HideSpotsByLevel = [][]geom.Vec3{
		0: {

			{
				X: 108,
				Y: 2,
				Z: 176,
			},
			{
				X: 147,
				Y: 2,
				Z: 81,
			},

			{
				X: 103,
				Y: 10,
				Z: 156,
			},
			{
				X: 103,
				Y: 10,
				Z: 149,
			},
			{
				X: 152,
				Y: 10,
				Z: 156,
			},
			{
				X: 152,
				Y: 10,
				Z: 149,
			},
			{
				X: 152,
				Y: 10,
				Z: 108,
			},
			{
				X: 152,
				Y: 10,
				Z: 101,
			},
			{
				X: 103,
				Y: 10,
				Z: 101,
			},
			{
				X: 103,
				Y: 10,
				Z: 108,
			},
		},
		1: {

			{
				X: 108,
				Y: 2,
				Z: 176,
			},
			{
				X: 147,
				Y: 2,
				Z: 81,
			},

			{
				X: 103,
				Y: 10,
				Z: 156,
			},
			{
				X: 103,
				Y: 10,
				Z: 149,
			},
			{
				X: 152,
				Y: 10,
				Z: 156,
			},
			{
				X: 152,
				Y: 10,
				Z: 149,
			},
			{
				X: 152,
				Y: 10,
				Z: 108,
			},
			{
				X: 152,
				Y: 10,
				Z: 101,
			},
			{
				X: 103,
				Y: 10,
				Z: 101,
			},
			{
				X: 103,
				Y: 10,
				Z: 108,
			},
		},
	}
	InfoSpotsByLevel = [][]geom.Vec3{
		0: {

			{
				X: 128,
				Y: 38,
				Z: 128,
			},
			{
				X: 127,
				Y: 38,
				Z: 129,
			},

			{
				X: 134,
				Y: 11,
				Z: 157,
			},
			{
				X: 121,
				Y: 11,
				Z: 157,
			},
			{
				X: 121,
				Y: 11,
				Z: 100,
			},
			{
				X: 134,
				Y: 11,
				Z: 100,
			},
		},
		1: {

			{
				X: 128,
				Y: 38,
				Z: 128,
			},
			{
				X: 127,
				Y: 38,
				Z: 129,
			},

			{
				X: 83,
				Y: 33,
				Z: 173,
			},
			{
				X: 173,
				Y: 7,
				Z: 173,
			},
			{
				X: 173,
				Y: 33,
				Z: 83,
			},
			{
				X: 83,
				Y: 7,
				Z: 83,
			},
		},
		2: nil,
		3: nil,
	}
)

Functions

This section is empty.

Types

type HColumn

type HColumn struct {
	Height   byte
	RowIndex byte
	Rule     byte
}

type HMap

type HMap struct {
	HeightMap   [][]HColumn
	Neighbours1 [][]uint16
}

func (*HMap) AStar

func (hm *HMap) AStar(start, goal geom.Vec3) ([]geom.Vec3, bool)

func (*HMap) At

func (hm *HMap) At(x, z int) HColumn

func (*HMap) BuildStaticNeighbours

func (hm *HMap) BuildStaticNeighbours()

func (*HMap) CastRay

func (hm *HMap) CastRay(src, dst geom.Vec3, max float64) bool

func (*HMap) CompileBytes

func (hm *HMap) CompileBytes() []byte

func (*HMap) Deserialize

func (hm *HMap) Deserialize(data []byte) error

func (*HMap) GetReachableNeighbours

func (hm *HMap) GetReachableNeighbours(x, y, z, agility int, allowRun bool) []geom.Vec3

func (*HMap) Serialize

func (hm *HMap) Serialize() ([]byte, error)

func (*HMap) UpdateProximityCosts

func (hm *HMap) UpdateProximityCosts(pos geom.Vec3, radius float64)

Jump to

Keyboard shortcuts

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