resources

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MoveUpAction is the action for moving up
	MoveUpAction = "MoveUp"

	// MoveDownAction is the action for moving down
	MoveDownAction = "MoveDown"

	// MoveLeftAction is the action for moving left
	MoveLeftAction = "MoveLeft"

	// MoveRightAction is the action for moving right
	MoveRightAction = "MoveRight"

	// PreviousLevelAction is the action for switching to the previous level
	PreviousLevelAction = "PreviousLevel"

	// NextLevelAction is the action for switching to the next level
	NextLevelAction = "NextLevel"

	// RestartAction is the action for restarting the level
	RestartAction = "Restart"

	// GoToLevelAction is the action for switching to a specific level
	GoToLevelAction = "GoToLevel"
)
View Source
const (
	StateEventNone       = StateEvent("NONE")
	StateEventWarpEscape = StateEvent("WARP_ESCAPE")
)
View Source
const (
	TilePlayer     = gloader.TilePlayer
	TileWall       = gloader.TileWall
	TileWarpNext   = gloader.TileWarpNext
	TileWarpEscape = gloader.TileWarpEscape
	TileEmpty      = gloader.TileEmpty
)

Tileはsystemなどでも使う。systemから直接gloaderを扱わせたくないので、ここでエクスポートする

Variables

This section is empty.

Functions

func InitLevel

func InitLevel(world w.World, levelNum int)

levelNum: 今いる階数

func Move

func Move(world w.World, movements ...MovementType)

func UpdateGameLayout

func UpdateGameLayout(world w.World, gridLayout *GridLayout) (int, int)

UpdateGameLayoutはゲームレイアウトを更新する

Types

type FieldPrefabs

type FieldPrefabs struct {
	LevelInfo   loader.EntityComponentList
	PackageInfo loader.EntityComponentList
}

type Game

type Game struct {
	StateEvent StateEvent
	Package    PackageData
	Level      Level
	GridLayout GridLayout
}

type GridLayout

type GridLayout struct {
	Width  int
	Height int
}

グリッドレイアウト

type Level

type Level struct {
	CurrentNum int
	Grid       vutil.Vec2d[Tile]
	Movements  []MovementType
	Modified   bool
}
type MenuPrefabs struct {
	InventoryMenu loader.EntityComponentList
	CraftMenu     loader.EntityComponentList
	EquipMenu     loader.EntityComponentList
}

type MovementType

type MovementType uint8
const (
	MovementUp MovementType = iota
	MovementDown
	MovementLeft
	MovementRight
)

type PackageData

type PackageData = gloader.PackageData

PackageData contains level package data

type Prefabs

type Prefabs struct {
	Menu  MenuPrefabs
	Intro loader.EntityComponentList
	Field FieldPrefabs
}

type StateEvent

type StateEvent string

type Tile

type Tile = gloader.Tile

Jump to

Keyboard shortcuts

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