model

package
v0.0.0-...-ee5ac80 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Tiles []Tile
}

func NewMap

func NewMap(tiles []Tile) *Map

type Player

type Player struct {
	Name     string   // プレイヤー名
	Position Position // プレイヤーの位置情報
	Image    *ebiten.Image
}

func NewPlayer

func NewPlayer(name string) *Player

コンストラクタ

type Position

type Position struct {
	X int // x座標
	Y int // y座標
}

(x,y)座標を格納する 左上が(0,0)

func NewPosition

func NewPosition() *Position

コンストラクタ

type Tile

type Tile struct {
	Position Position      // 座標位置(x,y)
	Image    *ebiten.Image // 画像
	TileType TileType      // タイプ
}

func NewTile

func NewTile(position Position) *Tile

コンストラクタ

type TileType

type TileType int
const (
	TileTypeGrassland TileType = iota // 草原
)

マップのタイルの種類を定義

Jump to

Keyboard shortcuts

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