Documentation ¶
Index ¶
- func NewRectangleSprite(owner components.SizeOwner, pivotType engine.PivotType, c color.RGBA) engine.Sprite
- func SpriteForBuilding(buildingType components.BuildingType) engine.Sprite
- func SpritesForBuilding(buildingType components.BuildingType) (bottomSprite engine.Sprite, topSprite engine.Sprite)
- type Building
- type ButtonConfig
- type Mountain
- type MountainType
- type Object
- type Overlay
- type Panel
- type PanelButton
- type ProgressBar
- type Tree
- type TreeType
- type Unit
- func (u Unit) GetAreaOccupant() *components.AreaOccupant
- func (u Unit) GetCitizen() *components.Citizen
- func (u Unit) GetClickable() *components.Clickable
- func (u Unit) GetCollider() *components.Collider
- func (u Unit) GetDrawable() *components.Drawable
- func (u Unit) GetMovable() *components.Movable
- func (u Unit) GetSelectable() *components.Selectable
- func (u Unit) GetWorldSpace() *components.WorldSpace
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRectangleSprite ¶
func SpriteForBuilding ¶
func SpriteForBuilding(buildingType components.BuildingType) engine.Sprite
func SpritesForBuilding ¶
func SpritesForBuilding(buildingType components.BuildingType) (bottomSprite engine.Sprite, topSprite engine.Sprite)
Types ¶
type Building ¶
type Building struct { Object *components.Selectable *components.Clickable *components.Collider *components.UnitSpawner *components.TimeActions }
func NewBuilding ¶
func NewBuilding(position engine.Vector, buildingType components.BuildingType) Building
func (Building) GetClickable ¶
func (b Building) GetClickable() *components.Clickable
func (Building) GetCollider ¶
func (b Building) GetCollider() *components.Collider
func (Building) GetSelectable ¶
func (b Building) GetSelectable() *components.Selectable
func (Building) GetTimeActions ¶
func (b Building) GetTimeActions() *components.TimeActions
func (Building) GetUnitSpawner ¶
func (b Building) GetUnitSpawner() *components.UnitSpawner
type ButtonConfig ¶
type Mountain ¶
type Mountain struct {
Object
}
func NewMountain ¶
func NewMountain(mountainType MountainType) Mountain
type MountainType ¶
type MountainType int
const ( MountainStone MountainType = iota MountainGold MountainIron )
type Object ¶
type Object struct { *engine.BaseEntity *components.WorldSpace *components.Drawable }
func NewObject ¶
func NewObject(sprite engine.Sprite, layer components.DrawingLayer) Object
func (Object) GetDrawable ¶
func (o Object) GetDrawable() *components.Drawable
func (Object) GetWorldSpace ¶
func (o Object) GetWorldSpace() *components.WorldSpace
type Overlay ¶
type Overlay struct { *engine.BaseEntity *components.WorldSpace *components.Drawable *components.Size }
func NewOverlay ¶
func (Overlay) GetDrawable ¶
func (o Overlay) GetDrawable() *components.Drawable
func (Overlay) GetSize ¶
func (o Overlay) GetSize() *components.Size
func (Overlay) GetWorldSpace ¶
func (o Overlay) GetWorldSpace() *components.WorldSpace
type Panel ¶
type Panel struct { Object *components.Clickable // contains filtered or unexported fields }
func NewFourButtonPanel ¶
func NewFourButtonPanel(buttonConfigs []ButtonConfig) Panel
func (Panel) GetClickable ¶
func (p Panel) GetClickable() *components.Clickable
type PanelButton ¶
type PanelButton struct { Object *components.Clickable *components.Button }
func NewPanelButton ¶
func NewPanelButton(color components.UIColor, spriteTop engine.Sprite, action func()) PanelButton
func (PanelButton) GetButton ¶
func (p PanelButton) GetButton() *components.Button
func (PanelButton) GetClickable ¶
func (p PanelButton) GetClickable() *components.Clickable
type ProgressBar ¶
type ProgressBar struct { Object *components.ProgressBar }
func NewHorizontalProgressBar ¶
func NewHorizontalProgressBar() ProgressBar
func (ProgressBar) GetProgressBar ¶
func (p ProgressBar) GetProgressBar() *components.ProgressBar
type Unit ¶
type Unit struct { *engine.BaseEntity *components.WorldSpace *components.Citizen *components.Drawable *components.Movable *components.Selectable *components.Clickable *components.Collider *components.AreaOccupant }
func NewUnit ¶
func NewUnit(team components.Team, class components.Class, spriteGetter spriteGetter) Unit
func (Unit) GetAreaOccupant ¶
func (u Unit) GetAreaOccupant() *components.AreaOccupant
func (Unit) GetCitizen ¶
func (u Unit) GetCitizen() *components.Citizen
func (Unit) GetClickable ¶
func (u Unit) GetClickable() *components.Clickable
func (Unit) GetCollider ¶
func (u Unit) GetCollider() *components.Collider
func (Unit) GetDrawable ¶
func (u Unit) GetDrawable() *components.Drawable
func (Unit) GetMovable ¶
func (u Unit) GetMovable() *components.Movable
func (Unit) GetSelectable ¶
func (u Unit) GetSelectable() *components.Selectable
func (Unit) GetWorldSpace ¶
func (u Unit) GetWorldSpace() *components.WorldSpace
type Worker ¶
type Worker struct { Unit *components.Builder *components.ResourcesCollector }
func NewWorker ¶
func NewWorker(team components.Team, spriteGetter spriteGetter) Worker
func (Worker) GetBuilder ¶
func (w Worker) GetBuilder() *components.Builder
func (Worker) GetResourcesCollector ¶
func (w Worker) GetResourcesCollector() *components.ResourcesCollector
Source Files ¶
Click to show internal directories.
Click to hide internal directories.