glclient

package
v0.0.0-...-d7572e3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFloor

type ClientFloor struct {
	FloorInfo *csprotocol.FloorInfo
	Tiles     tilearea.TileArea `prettystring:"simple"`

	Visited        *visitarea.VisitArea `prettystring:"simple"`
	XWrapper       *wrapper.Wrapper     `prettystring:"simple"`
	YWrapper       *wrapper.Wrapper     `prettystring:"simple"`
	XWrapSafe      func(i int) int
	YWrapSafe      func(i int) int
	Tiles4PathFind *tilearea4pathfind.TileArea4PathFind `prettystring:"simple"`

	FieldObjPosMan uuidposmani.UUIDPosManI `prettystring:"simple"`

	// for g3n
	Scene *node.Node

	// tiles at x,y
	TileMeshs [tile.Tile_Count][][]*graphic.Mesh
	// fieldobj at x,y
	FieldObjMeshs [][]*graphic.Mesh
	// contains filtered or unexported fields
}

func NewClientFloor

func NewClientFloor(
	meshMaker *MeshMaker,
	FloorInfo *csprotocol.FloorInfo) *ClientFloor

func (*ClientFloor) AddOrUpdateFieldObj

func (cf *ClientFloor) AddOrUpdateFieldObj(v *csprotocol.FieldObjClient)

func (*ClientFloor) Cleanup

func (cf *ClientFloor) Cleanup()

func (*ClientFloor) EnterFloor

func (cf *ClientFloor) EnterFloor(TurnCount int)

func (*ClientFloor) FindMovableDir

func (cf *ClientFloor) FindMovableDir(x, y int, dir way9type.Way9Type) way9type.Way9Type

func (*ClientFloor) Forget

func (cf *ClientFloor) Forget()

func (*ClientFloor) GetBias

func (cf *ClientFloor) GetBias() bias.Bias

func (*ClientFloor) GetFieldObjAt

func (cf *ClientFloor) GetFieldObjAt(x, y int) *csprotocol.FieldObjClient

func (*ClientFloor) IsValidPos

func (cf *ClientFloor) IsValidPos(x, y int) bool

func (*ClientFloor) LeaveFloor

func (cf *ClientFloor) LeaveFloor()

func (*ClientFloor) PosAddDir

func (cf *ClientFloor) PosAddDir(x, y int, dir way9type.Way9Type) (int, int)

func (*ClientFloor) ReplaceFloorTiles

func (cf *ClientFloor) ReplaceFloorTiles(tiles tilearea.TileArea)

replace tile rect at x,y

func (*ClientFloor) String

func (cf *ClientFloor) String() string

func (*ClientFloor) UpdateFieldObjList

func (cf *ClientFloor) UpdateFieldObjList(folsit []*csprotocol.FieldObjClient)

func (*ClientFloor) UpdateFromViewportTile

func (cf *ClientFloor) UpdateFromViewportTile(
	vp *csprotocol.NotiVPTiles,
	vpXYLenList findnear.XYLenList) error

type ClientFloorList

type ClientFloorList []*ClientFloor

func (ClientFloorList) Len

func (cfList ClientFloorList) Len() int

func (ClientFloorList) Less

func (cfList ClientFloorList) Less(i, j int) bool

func (ClientFloorList) Sort

func (cfList ClientFloorList) Sort()

func (ClientFloorList) Swap

func (cfList ClientFloorList) Swap(i, j int)

type GLClient

type GLClient struct {
	GameInfo *csprotocol.GameInfo

	ViewportXYLenList findnear.XYLenList
	Name2Floor        map[string]*ClientFloor
	CurrentFloor      *ClientFloor

	// turn data
	OLNotiData *csprotocol.NotiVPObjList

	IsOverLoad bool
	HPdiff     float64
	SPdiff     float64
	// contains filtered or unexported fields
}

func New

func New(
	config *goguelikeconfig.GoguelikeConfig,
	gameInfo *csprotocol.GameInfo,
	c2tch, t2cch chan *csprotocol.Packet) *GLClient

func (*GLClient) GetPlayerXY

func (app *GLClient) GetPlayerXY() (int, int)

func (*GLClient) GetTurnCount

func (app *GLClient) GetTurnCount() int

func (*GLClient) Run

func (ga *GLClient) Run() error

func (*GLClient) TowerBias

func (app *GLClient) TowerBias() bias.Bias

type MeshMaker

type MeshMaker struct {
	// contains filtered or unexported fields
}

func NewMeshMaker

func NewMeshMaker(dataFolder string) *MeshMaker

func (*MeshMaker) GetActiveObj

func (mm *MeshMaker) GetActiveObj(ft factiontype.FactionType, x, y int) *graphic.Mesh

func (*MeshMaker) GetCarryObj

func (mm *MeshMaker) GetCarryObj(cokey COKey, x, y int) *graphic.Mesh

func (*MeshMaker) GetDangerObj

func (mm *MeshMaker) GetDangerObj(dt dangertype.DangerType, x, y int) *graphic.Mesh

func (*MeshMaker) GetTile

func (mm *MeshMaker) GetTile(tl tile.Tile, x, y int) *graphic.Mesh

func (*MeshMaker) PutActiveObj

func (mm *MeshMaker) PutActiveObj(mesh *graphic.Mesh)

func (*MeshMaker) PutCarryObj

func (mm *MeshMaker) PutCarryObj(mesh *graphic.Mesh)

func (*MeshMaker) PutDangerObj

func (mm *MeshMaker) PutDangerObj(mesh *graphic.Mesh)

func (*MeshMaker) PutFieldObj

func (mm *MeshMaker) PutFieldObj(mesh *graphic.Mesh)

func (*MeshMaker) PutTile

func (mm *MeshMaker) PutTile(tl tile.Tile, mesh *graphic.Mesh)

func (*MeshMaker) String

func (mm *MeshMaker) String() string

type ShiftInfo

type ShiftInfo struct {
	X float32
	Y float32
	Z float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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