scene

package
v0.0.0-...-59843aa Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecorationList

type DecorationList struct {
	ID   int
	Name string
	X    int
	Y    int
}

type ElementList

type ElementList struct {
	ID     int
	Type   string
	Name   string
	Width  int
	Height int
	X      int
	Y      int
	Ry     int
	Rx     int
}

type ExitList

type ExitList struct {
	ID   int
	Name string
	X    int
	Y    int
}

type Info

type Info struct {
	ID             int
	Name           string
	Width          int
	Height         int
	Music          string
	ElementList    []ElementList
	NpcList        []NpcList
	DecorationList []DecorationList
	ExitList       []ExitList
	MaskData       [][]uint8
}

type NpcList

type NpcList struct {
	ID   int
	Name string
	X    int
	Y    int
}

type Scene

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

func NewScene

func NewScene(engine *g2d.Engine, id int) (scene Scene, err error)

func (*Scene) AstarCheckPoint

func (s *Scene) AstarCheckPoint(x, y int) bool

func (*Scene) Draw

func (s *Scene) Draw(canvas g2d.Canvas, gridcolor string)

func (*Scene) GetAstarPath

func (s *Scene) GetAstarPath(x1, y1, x2, y2 int) (path []g2d.Point)

func (*Scene) GetInfo

func (s *Scene) GetInfo() Info

func (*Scene) GetOffset

func (s *Scene) GetOffset() (x, y int)

func (*Scene) GetVolume

func (s *Scene) GetVolume() float64

func (*Scene) LookAt

func (s *Scene) LookAt(x, y int)

func (*Scene) SetImage

func (s *Scene) SetImage(x, y int, data []byte) error

func (*Scene) SetOffset

func (s *Scene) SetOffset(x, y int)

func (*Scene) SetVolume

func (s *Scene) SetVolume(volume float64)

0-1

func (*Scene) Update

func (s *Scene) Update() error

Jump to

Keyboard shortcuts

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