tile

package
v0.0.0-...-d7572e3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Swamp  Tile = iota // layer 1
	Soil               //
	Stone              //
	Sand               //
	Sea                //
	Magma              //
	Ice                //
	Grass              //
	Tree               // layer 2
	Road               // layer 4
	Room               //
	Wall               //
	Window             //
	Door               //
	Fog                // layer 3
	Smoke              //

	Tile_Count int = iota
)

Variables

View Source
var TileScrollAttrib = [Tile_Count]struct {
	Texture      bool
	SrcXBiasAxis int // 0-2 in bias
	AniXSpeed    float64
	SrcYBiasAxis int // 0-2 in bias
	AniYSpeed    float64
}{
	Fog:   {true, 0, 64, 1, 64},
	Smoke: {true, 0, 48, 1, 48},

	Magma: {true, 2, 64, 0, 64},

	Swamp: {true, 0, 48, 2, 48},
	Sea:   {true, 0, 24, 2, 24},
	Ice:   {true, 0, 8, 2, 8},

	Grass: {true, 1, 8, 2, 8},
	Tree:  {true, 1, 4, 2, 4},

	Sand:  {true, 0, 8, 1, 8},
	Soil:  {true, 0, 2, 1, 2},
	Stone: {true, 0, 1, 1, 1},

	Road:   {true, 0, 0, 0, 0},
	Room:   {true, 0, 0, 0, 0},
	Wall:   {false, 0, 0, 0, 0},
	Window: {false, 0, 0, 0, 0},
	Door:   {false, 0, 0, 0, 0},
}
View Source
var TileShadowAttrib = [Tile_Count]struct {
	Cast    bool
	Receive bool
}{
	Swamp:  {false, true},
	Soil:   {false, true},
	Stone:  {false, true},
	Sand:   {false, true},
	Sea:    {false, true},
	Magma:  {false, true},
	Ice:    {false, true},
	Grass:  {false, true},
	Tree:   {true, false},
	Road:   {false, true},
	Room:   {false, true},
	Wall:   {true, false},
	Window: {false, false},
	Door:   {false, false},
	Fog:    {false, false},
	Smoke:  {false, false},
}

Functions

This section is empty.

Types

type AttribEle

type AttribEle struct {
	NeedHPOther  float64
	NeedHPMove   float64
	NeedHPAttack float64
	NeedSPOther  float64
	NeedSPMove   float64
	NeedSPAttack float64
	AtkMod       float64
	DefMod       float64
	BlockSight   float64
	Slippery     bool
	Color        [3]uint8
	ObjOnTile    ObjOnTile_Type
	Name         string
}

type ObjOnTile_Type

type ObjOnTile_Type uint8
const (
	ObjOnTile_0 ObjOnTile_Type = iota // forbid place obj
	ObjOnTile_1                       // can place a obj, can battle
	ObjOnTile_N                       // can place multiful obj, cannot battle
)

type Tile

type Tile uint8

func String2Tile

func String2Tile(s string) (Tile, bool)

func (Tile) Attrib

func (tt Tile) Attrib() AttribEle

func (Tile) CommentString

func (e Tile) CommentString() string

func (Tile) String

func (e Tile) String() string

Jump to

Keyboard shortcuts

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