Documentation ¶
Index ¶
- Constants
- func InitLevel(world w.World, levelNum int)
- func Move(world w.World, movements ...MovementType)
- func UpdateGameLayout(world w.World, gridLayout *GridLayout) (int, int)
- type FieldPrefabs
- type Game
- type GridLayout
- type Level
- type MenuPrefabs
- type MovementType
- type PackageData
- type Prefabs
- type StateEvent
- type Tile
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 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 MenuPrefabs ¶
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 Prefabs ¶
type Prefabs struct { Menu MenuPrefabs Intro loader.EntityComponentList Field FieldPrefabs }
type StateEvent ¶
type StateEvent string
Click to show internal directories.
Click to hide internal directories.