resources

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: GPL-3.0 Imports: 10 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")
	StateEventWarpNext   = StateEvent("WARP_NEXT")
	StateEventWarpEscape = StateEvent("WARP_ESCAPE")
)

Variables

This section is empty.

Functions

func NewLevel added in v1.36.0

func NewLevel(world w.World, newDepth int, width gc.Row, height gc.Col) loader.Level

func SpawnFieldWall added in v1.41.0

func SpawnFieldWall(world w.World, x gc.Row, y gc.Col) ecs.Entity

フィールド上に表示される壁を生成する

func SpawnFieldWarpNext added in v1.41.0

func SpawnFieldWarpNext(world w.World, x gc.Row, y gc.Col) ecs.Entity

フィールド上に表示される階段を生成する

func SpawnFloor added in v1.41.0

func SpawnFloor(world w.World, x gc.Row, y gc.Col) ecs.Entity

フィールド上に表示される床を生成する

func SpawnPlayer added in v1.41.0

func SpawnPlayer(world w.World, x int, y int)

フィールド上に表示されるプレイヤーを生成する

func UpdateGameLayout

func UpdateGameLayout(world w.World) (int, int)

UpdateGameLayoutはゲームウィンドウサイズを更新する

Types

type Game

type Game struct {
	// フィールド上で発生したイベント。各stateで補足されて処理される
	StateEvent StateEvent
	// 現在階のフィールド情報
	Level loader.Level
	// 階層数
	Depth int
}

type StateEvent

type StateEvent string

フィールド上でのイベント

Jump to

Keyboard shortcuts

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