Documentation
¶
Index ¶
- Variables
- func TilemapRenderer(world *ecs.World, entity ecs.Entity) (rendering.RenderingTask, int, error)
- type Tilemap
- func (t *Tilemap) ClearDirtyTiles()
- func (t *Tilemap) Fill(tile int)
- func (t *Tilemap) GetTile(x, y int) (tile int)
- func (t *Tilemap) IsDirty() bool
- func (t *Tilemap) MarshalJSON() ([]byte, error)
- func (t *Tilemap) SetTile(x, y, tile int)
- func (t *Tilemap) Size() int
- func (t *Tilemap) UnmarshalJSON(data []byte) error
- type TilemapComponent
- type TilemapRenderComponent
- type TilemapStorage
- func (c *TilemapStorage) Allocate(key string, data []byte) error
- func (c *TilemapStorage) AssetTypes() types.HashSet[string]
- func (c *TilemapStorage) Deallocate(key string) error
- func (c *TilemapStorage) DefaultKey() string
- func (c *TilemapStorage) Get(key string) (*Tilemap, error)
- func (c *TilemapStorage) Has(key string) bool
- func (c *TilemapStorage) Put(key string, value any) error
- func (c *TilemapStorage) SetDefault(key string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var TilemapComponentType = ecs.NewComponentType[*TilemapComponent]()
View Source
var TilemapRenderComponentType = ecs.NewComponentType[*TilemapRenderComponent]()
Functions ¶
func TilemapRenderer ¶
Types ¶
type Tilemap ¶
type Tilemap struct {
Rows int `json:"rows"`
Columns int `json:"columns"`
TilesetID string `json:"tileset_id"`
// contains filtered or unexported fields
}
func NewTilemap ¶
func (*Tilemap) ClearDirtyTiles ¶
func (t *Tilemap) ClearDirtyTiles()
func (*Tilemap) MarshalJSON ¶
func (*Tilemap) UnmarshalJSON ¶
type TilemapComponent ¶
type TilemapComponent struct {
TilemapID string
}
func NewEmptyTilemapComponent ¶
func NewEmptyTilemapComponent() *TilemapComponent
func NewTilemapComponent ¶
func NewTilemapComponent(tilemapID string) *TilemapComponent
func (*TilemapComponent) Type ¶
func (c *TilemapComponent) Type() ecs.ComponentType
type TilemapRenderComponent ¶
type TilemapRenderComponent struct {
ZOrder int
}
func NewTilemapRenderComponent ¶
func NewTilemapRenderComponent(zOrder int) *TilemapRenderComponent
func (*TilemapRenderComponent) Type ¶
func (c *TilemapRenderComponent) Type() ecs.ComponentType
type TilemapStorage ¶
type TilemapStorage struct {
// contains filtered or unexported fields
}
func Storage ¶
func Storage() *TilemapStorage
func (*TilemapStorage) AssetTypes ¶
func (c *TilemapStorage) AssetTypes() types.HashSet[string]
func (*TilemapStorage) Deallocate ¶
func (c *TilemapStorage) Deallocate(key string) error
func (*TilemapStorage) DefaultKey ¶
func (c *TilemapStorage) DefaultKey() string
func (*TilemapStorage) Has ¶
func (c *TilemapStorage) Has(key string) bool
func (*TilemapStorage) SetDefault ¶
func (c *TilemapStorage) SetDefault(key string) error
Click to show internal directories.
Click to hide internal directories.