Documentation ¶
Index ¶
- func ColorFromHex(hexv string) color.RGBA
- type AnimatedSpriteNode
- type Animation
- type Dict
- type Engine
- type EngineOptions
- type FnNode
- type LabelNode
- func (o LabelNode) AddChild(child Object)
- func (o LabelNode) Children() []Object
- func (n *LabelNode) Label() *core.Label
- func (n *LabelNode) Layer() Layer
- func (o LabelNode) RemoveChild(child Object)
- func (n *LabelNode) SetLayer(l Layer)
- func (n *LabelNode) SetZIndex(index int64)
- func (n *LabelNode) ZIndex() int64
- type Layer
- type NewEngineInput
- type Node
- type Object
- type ObjectContainer
- type SpriteNode
- func (o SpriteNode) AddChild(child Object)
- func (o SpriteNode) Children() []Object
- func (n *SpriteNode) Layer() Layer
- func (o SpriteNode) RemoveChild(child Object)
- func (n *SpriteNode) SetLayer(l Layer)
- func (n *SpriteNode) SetZIndex(index int64)
- func (n *SpriteNode) Sprite() *core.Sprite
- func (n *SpriteNode) ZIndex() int64
- type StepInfo
- type TileSetNode
- func (o TileSetNode) AddChild(child Object)
- func (o TileSetNode) Children() []Object
- func (n *TileSetNode) Layer() Layer
- func (o TileSetNode) RemoveChild(child Object)
- func (n *TileSetNode) SetLayer(l Layer)
- func (n *TileSetNode) SetZIndex(index int64)
- func (n *TileSetNode) TileSet() *core.TileSet
- func (n *TileSetNode) ZIndex() int64
- type TransformGetter
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorFromHex ¶ added in v0.3.0
ColorFromHex parses a RRGGBBAA (or RRGGBB) hexadecimal color into color.RGBA
Returns color.Transparent on invalid hex inputs.
Types ¶
type AnimatedSpriteNode ¶ added in v0.5.0
type AnimatedSpriteNode struct { *SpriteNode // contains filtered or unexported fields }
func NewChildAnimatedSpriteNode ¶ added in v0.5.0
func NewChildAnimatedSpriteNode(parent ObjectContainer, layer Layer, fps float64, anim core.Animation) *AnimatedSpriteNode
func NewRootAnimatedSpriteNode ¶ added in v0.5.0
func (AnimatedSpriteNode) AddChild ¶ added in v0.5.0
func (o AnimatedSpriteNode) AddChild(child Object)
func (AnimatedSpriteNode) Children ¶ added in v0.5.0
func (o AnimatedSpriteNode) Children() []Object
func (AnimatedSpriteNode) RemoveChild ¶ added in v0.5.0
func (o AnimatedSpriteNode) RemoveChild(child Object)
func (*AnimatedSpriteNode) SpriteAnim ¶ added in v0.5.0
func (n *AnimatedSpriteNode) SpriteAnim() *core.SpriteAnimation
type Dict ¶
type Dict struct {
// contains filtered or unexported fields
}
Dict is a concurrency-safe map.
type EngineOptions ¶
type EngineOptions struct { Width int Height int Scale float64 Title string IsFullscreen bool IsResizable bool IsMaxResolution bool IsTransparentScreen bool IsFloating bool IsMaximized bool IsFixedResolution bool }
EngineOptions is used to setup Ebiten @ Engine.boot
type FnNode ¶ added in v0.5.0
type FnNode struct { *Node // contains filtered or unexported fields }
func NewRootFnNode ¶ added in v0.5.0
func (FnNode) RemoveChild ¶ added in v0.5.0
func (o FnNode) RemoveChild(child Object)
type LabelNode ¶ added in v0.5.0
type LabelNode struct { *Node // contains filtered or unexported fields }
func NewChildLabelNode ¶ added in v0.5.0
func NewChildLabelNode(parent ObjectContainer, layer Layer) *LabelNode
func NewRootLabelNode ¶ added in v0.5.0
func (LabelNode) RemoveChild ¶ added in v0.5.0
func (o LabelNode) RemoveChild(child Object)
type Layer ¶ added in v0.3.0
type Layer = core.LayerIndex
Layer index type
const ( Layer0 Layer = 0 Layer1 Layer = 1 Layer2 Layer = 2 Layer3 Layer = 3 Layer4 Layer = 4 Layer5 Layer = 5 Layer6 Layer = 6 Layer7 Layer = 7 Layer8 Layer = 8 Layer9 Layer = 9 Layer10 Layer = 10 Layer11 Layer = 11 Layer12 Layer = 12 Layer13 Layer = 13 Layer14 Layer = 14 Layer15 Layer = 15 )
LAYERS
type NewEngineInput ¶
type NewEngineInput struct { Width int // main window width Height int // main window height Scale float64 // pixel scale (default: 1) TransparentScreen bool // transparent screen Maximized bool // start window maximized Floating bool // always on top of all windows Fullscreen bool // start in fullscreen Resizable bool // is window resizable? FixedResolution bool // fixed logical screen resolution FixedWidth int // fixed logical screen resolution FixedHeight int // fixed logical screen resolution MaxResolution bool // set width/height to max resolution Title string // window title FS io.Filesystem // TODO: drop this OnReady func(e Engine) // function to run once the window is opened }
NewEngineInput is the input data of NewEngine
func (*NewEngineInput) Options ¶
func (i *NewEngineInput) Options() EngineOptions
Options will create a EngineOptions struct to be used in an *Engine
type Node ¶ added in v0.5.0
type Node struct {
// contains filtered or unexported fields
}
func NewChildNode ¶ added in v0.5.0
func NewChildNode(parent ObjectContainer) *Node
func NewRootNode ¶ added in v0.5.0
func (Node) RemoveChild ¶ added in v0.5.0
func (o Node) RemoveChild(child Object)
func (*Node) SetParent ¶ added in v0.5.0
func (t *Node) SetParent(parent ObjectContainer)
type Object ¶ added in v0.3.0
type Object interface { Entity() ecs.Entity World() World Destroy() SetParent(parent ObjectContainer) }
Object is the base of any Primen base ECS object
type ObjectContainer ¶ added in v0.3.0
type ObjectContainer interface { Object Children() []Object AddChild(child Object) RemoveChild(child Object) }
ObjectContainer is an object that contains other objects
type SpriteNode ¶ added in v0.5.0
type SpriteNode struct { *Node // contains filtered or unexported fields }
func NewChildSpriteNode ¶ added in v0.5.0
func NewChildSpriteNode(parent ObjectContainer, layer Layer) *SpriteNode
func NewRootSpriteNode ¶ added in v0.5.0
func NewRootSpriteNode(w World, layer Layer) *SpriteNode
func (*SpriteNode) Layer ¶ added in v0.5.0
func (n *SpriteNode) Layer() Layer
func (SpriteNode) RemoveChild ¶ added in v0.5.0
func (o SpriteNode) RemoveChild(child Object)
func (*SpriteNode) SetLayer ¶ added in v0.5.0
func (n *SpriteNode) SetLayer(l Layer)
func (*SpriteNode) SetZIndex ¶ added in v0.5.0
func (n *SpriteNode) SetZIndex(index int64)
func (*SpriteNode) Sprite ¶ added in v0.5.0
func (n *SpriteNode) Sprite() *core.Sprite
func (*SpriteNode) ZIndex ¶ added in v0.5.0
func (n *SpriteNode) ZIndex() int64
type TileSetNode ¶ added in v0.5.0
type TileSetNode struct { *Node // contains filtered or unexported fields }
func NewChildTileSetNode ¶ added in v0.5.0
func NewChildTileSetNode(parent ObjectContainer, layer Layer, db []*ebiten.Image, rows, cols int, cellwidthpx, cellheightpx float64, cells []int) *TileSetNode
func NewRootTileSetNode ¶ added in v0.5.0
func (*TileSetNode) Layer ¶ added in v0.5.0
func (n *TileSetNode) Layer() Layer
func (TileSetNode) RemoveChild ¶ added in v0.5.0
func (o TileSetNode) RemoveChild(child Object)
func (*TileSetNode) SetLayer ¶ added in v0.5.0
func (n *TileSetNode) SetLayer(l Layer)
func (*TileSetNode) SetZIndex ¶ added in v0.5.0
func (n *TileSetNode) SetZIndex(index int64)
func (*TileSetNode) TileSet ¶ added in v0.5.0
func (n *TileSetNode) TileSet() *core.TileSet
func (*TileSetNode) ZIndex ¶ added in v0.5.0
func (n *TileSetNode) ZIndex() int64
type TransformGetter ¶ added in v0.3.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package core contains lower level component systems.
|
Package core contains lower level component systems. |
examples
|
|
layers/res
Code generated by broccoli at 2020-06-24T17:37:10-03:00.
|
Code generated by broccoli at 2020-06-24T17:37:10-03:00. |
internal
|
|
Package rx holds default resources for Primen
|
Package rx holds default resources for Primen |
Click to show internal directories.
Click to hide internal directories.