tiled

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tiled has the components for adding tiled maps to our game

Index

Constants

This section is empty.

Variables

View Source
var Get = gets{

	Map: func(e *goecs.Entity) Map {
		return e.Get(TYPE.Map).(Map)
	},

	MapState: func(e *goecs.Entity) MapState {
		return e.Get(TYPE.MapState).(MapState)
	},

	BlockInfo: func(e *goecs.Entity) BlockInfo {
		return e.Get(TYPE.BlockInfo).(BlockInfo)
	},
}

Get a geometry component

TYPE hold the reflect.Type for our tiled components

Functions

This section is empty.

Types

type BlockInfo added in v0.1.5

type BlockInfo struct {
	Properties map[string]string // Properties are the properties for this block
	Row        int               // Row is the row of this block in the map
	Col        int               // Col is the col of this block in the map
	Layer      string            // Layer is the layer name for this block
}

BlockInfo contains the info for a title block

type Map

type Map struct {
	Name  string  // Name of our tiled.Map
	Scale float32 // Scale is the map scale
}

Map is a tiled.Map

type MapState

type MapState struct {
	Position geometry.Point // Position is the map position
	Scale    float32        // Scale is the map scale
}

MapState is the state for tiled.Map

Jump to

Keyboard shortcuts

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