components

package
v0.0.0-...-af47be6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2016 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collider

type Collider struct {
	engine.BaseComponent
	Rect *image.Rectangle
}

func NewCollider

func NewCollider() *Collider

type Controller

type Controller struct {
	engine.BaseComponent
	Speed float32
}

func NewController

func NewController() *Controller

func (*Controller) Update

func (sp *Controller) Update()

type SmoothFollow

type SmoothFollow struct {
	engine.BaseComponent
	Target *engine.GameObject
	Speed  float32
	MaxDis float32
}

func NewSmoothFollow

func NewSmoothFollow(target *engine.GameObject, speed float32, maxdis float32) *SmoothFollow

func (*SmoothFollow) LateUpdate

func (sp *SmoothFollow) LateUpdate()

func (*SmoothFollow) Start

func (sp *SmoothFollow) Start()

type UIButton

type UIButton struct {
	engine.BaseComponent
	// contains filtered or unexported fields
}

func NewUIButton

func NewUIButton(ClickCallback func(), HoverCallback func(bool)) *UIButton

func (*UIButton) OnMouseEnter

func (btn *UIButton) OnMouseEnter(arbiter engine.Arbiter) bool

func (*UIButton) OnMouseExit

func (btn *UIButton) OnMouseExit(arbiter engine.Arbiter)

func (*UIButton) Update

func (btn *UIButton) Update()

type UIText

type UIText struct {
	engine.BaseComponent
	Font *engine.Font

	Color engine.Color
	// contains filtered or unexported fields
}

func NewUIText

func NewUIText(font *engine.Font, text string) *UIText

func (*UIText) Align

func (ui *UIText) Align() engine.Align

func (*UIText) Draw

func (ui *UIText) Draw()

func (*UIText) GetPixelSize

func (ui *UIText) GetPixelSize(text string) (width float32, height float32)

func (*UIText) Height

func (ui *UIText) Height() float32

func (*UIText) LateUpdate

func (ui *UIText) LateUpdate()

func (*UIText) OnComponentAdd

func (ui *UIText) OnComponentAdd()

func (*UIText) SetAlign

func (ui *UIText) SetAlign(align engine.Align)

func (*UIText) SetFocus

func (ui *UIText) SetFocus(b bool)

func (*UIText) SetString

func (ui *UIText) SetString(text string)

func (*UIText) SetWritable

func (ui *UIText) SetWritable(b bool)

func (*UIText) Start

func (ui *UIText) Start()

func (*UIText) String

func (ui *UIText) String() string

func (*UIText) Update

func (ui *UIText) Update()

func (*UIText) UpdateCollider

func (ui *UIText) UpdateCollider()

Todo: make this an interface.

func (*UIText) Width

func (ui *UIText) Width() float32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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