Back to godoc.org

Package game

v0.0.0-...-c46efdc
Latest Go to latest

The latest major version is .

Published: Aug 29, 2020 | License: GPL3 | Module: github.com/griffithsh/squads

Index

Variables

var BigPortrait = 52

BigPortrait is the dimensions of the big portraits in the game.

var PortraitBGBig = []Sprite{
	Sprite{
		Texture: "portrait-backgrounds.png", X: 0, Y: 0, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait, Y: 0, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait * 2, Y: 0, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait * 3, Y: 0, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: 0, Y: BigPortrait, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait, Y: BigPortrait, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait * 2, Y: BigPortrait, W: BigPortrait, H: BigPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: BigPortrait * 3, Y: BigPortrait, W: BigPortrait, H: BigPortrait,
	},
}

PortraitBGBig stores a list of portrait backgrounds for large icons.

var PortraitBGSmall = []Sprite{
	Sprite{
		Texture: "portrait-backgrounds.png", X: 0, Y: 208, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: SmallPortrait, Y: 208, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: SmallPortrait * 2, Y: 208, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: SmallPortrait * 3, Y: 208, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: 208, Y: 0, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: 208, Y: SmallPortrait, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: 208, Y: SmallPortrait * 2, W: SmallPortrait, H: SmallPortrait,
	},
	Sprite{
		Texture: "portrait-backgrounds.png", X: 208, Y: SmallPortrait * 3, W: SmallPortrait, H: SmallPortrait,
	},
}

PortraitBGSmall stores a list of portrait backgrounds for small icons.

var PortraitFrameBig = []Sprite{
	Sprite{
		Texture: "portrait-frames.png", X: 0, Y: 0, W: BigPortrait, H: BigPortrait,
	},
}

PortraitFrameBig stores a list of portrait frames for large icons.

var PortraitFrameSmall = []Sprite{
	Sprite{
		Texture: "portrait-frames.png", X: 0, Y: 208, W: SmallPortrait, H: SmallPortrait,
	},
}

PortraitFrameSmall stores a list of portrait frames for small icons.

var SmallPortrait = BigPortrait / 2

SmallPortrait is the dimensions of the small portraits in the game.

func MaxHealth

func MaxHealth(rawHealth, vitality int) int

type Alpha

type Alpha struct {
	Value float64 // Value should be between 0.0 and 1.0
}

Alpha is a component that controls how visible an Entity should be rendered.

func (*Alpha) Type

func (*Alpha) Type() string

Type of this Component.

type AnimationEndBehavior

type AnimationEndBehavior int

AnimationEndBehavior is an enum that describes what happens when a FrameAnimation Component finishes all of its frames.

const (
	// AnimationLoops means that the Animation will restart from the first frame
	// after the last frame expires.
	AnimationLoops AnimationEndBehavior = iota
	// HoldLastFrame means that the Animation will run through all frames, and
	// then stick on the last frame, removing the FrameAnimation Component.
	HoldLastFrame
	// DestroyEntity means that after the Animation is complete, the Entity that
	// owns it is destroyed.
	DestroyEntity
)

type AnimationSpeed

type AnimationSpeed struct {
	Speed float64
}

AnimationSpeed changes the rate at which Animtions are animated. A value of 1.0 is normal speed, and a value of 0.0 would mean that the animation never progresses from the first frame. 0.5 would animate at half speed.

func (*AnimationSpeed) Type

func (*AnimationSpeed) Type() string

Type of this Component.

type AnimationSystem

type AnimationSystem struct{}

AnimationSystem animates the visual Components of Entities. It's not responsible for translating or mapping game concepts like "casting a spell" to the assignment of appropriate animation Components for that Entity.

func (*AnimationSystem) Update

func (as *AnimationSystem) Update(mgr *ecs.World, elapsed time.Duration)

Update all Animated Entities.

type Appearance

type Appearance struct {
	Participant Sprite `json:"participant"`
	FaceX       int    `json:"faceX"`
	FaceY       int    `json:"faceY"`
	FeetX       int    `json:"feetX"`
	FeetY       int    `json:"feetY"`
}

Appearance is how a Character appears in combat.

func (*Appearance) BigIcon

func (a *Appearance) BigIcon() Sprite

BigIcon creates a new Sprite to use as a 52 by 52 portrait.

func (*Appearance) SmallIcon

func (a *Appearance) SmallIcon() Sprite

SmallIcon creates a new Sprite to use as a 26 by 26 portrait.

type Camera

type Camera struct {
	// contains filtered or unexported fields
}

Camera is a class that stores focus and zoom values

func NewCamera

func NewCamera(width, height int, bus *event.Bus) *Camera

NewCamera creates a new camera for a view of the requested width and height

func (*Camera) Center

func (c *Camera) Center(x, y float64)

Center the view on a point.

func (*Camera) GetH

func (c *Camera) GetH() int

GetH returns the height of the game's window.

func (*Camera) GetW

func (c *Camera) GetW() int

GetW returns the width of the game's window.

func (*Camera) GetX

func (c *Camera) GetX() float64

GetX coordinate of the camera.

func (*Camera) GetY

func (c *Camera) GetY() float64

GetY coordinate of the camera.

func (*Camera) GetZoom

func (c *Camera) GetZoom() float64

GetZoom of the camera.

func (*Camera) Modulo

func (c *Camera) Modulo(x, y int) (int, int)

Modulo an x,y screen coordinate so that things that are beyond the limits of the screen are wrapped around. Use case is when you want to display something aligned to the bottom of the screen, you can set a negative y coordinate, and Modulo will convert that to screen height - y.

func (*Camera) ScreenToWorld

func (c *Camera) ScreenToWorld(sx, sy int) (wx, wy float64)

ScreenToWorld translates screen coordinates to world coordinates based on the current zoom and focus values.

func (*Camera) SetX

func (c *Camera) SetX(x float64)

SetX coordinate of the camera.

func (*Camera) SetY

func (c *Camera) SetY(y float64)

SetY coordinate of the camera.

func (*Camera) SetZoom

func (c *Camera) SetZoom(zoom float64)

SetZoom of the camera.

func (*Camera) Update

func (c *Camera) Update(elapsed time.Duration)

Update the camera so that interesting things can be panned to.

type Center

type Center struct {
	X, Y float64
}

Center defines the centre of something.

type Character

type Character struct {
	// Things that don't affect gameplay.
	Name          string
	Skin          string
	Hair          string
	PortraitBG    int
	PortraitFrame int

	// Intrinsic to the Character
	Profession string
	Sex        CharacterSex

	// InherantPreparation is the preparation value that this Character has as a
	// base, before values from their profession and equipped weapon are
	// applied.
	InherantPreparation int

	// InherantActionPoints is the base ActionPoints that this character has
	// before values from their profession and equipped weapon are applied.
	InherantActionPoints int

	CurrentHealth int
	BaseHealth    int

	Level                int
	StrengthPerLevel     float64
	AgilityPerLevel      float64
	IntelligencePerLevel float64
	VitalityPerLevel     float64

	Disambiguator float64 // random number to order Characters when their Preparation etc collide.

	// Masteries indexed by the enum value.
	Masteries map[Mastery]int
}

Character represents a character at the run level, and persists until the run is over.

func (*Character) Type

func (*Character) Type() string

Type of this Component.

type CharacterPerformance

type CharacterPerformance int
const (
	PerformIdle CharacterPerformance = iota
	PerformMove
	PerformSkill1
	PerformSkill2
	PerformSkill3
	PerformHurt
	PerformDying
	PerformVictory
)

func (CharacterPerformance) String

func (i CharacterPerformance) String() string

type CharacterSex

type CharacterSex int

CharacterSex is not CharacterGender, NB.

const (
	Male CharacterSex = iota
	Female
)

CharacterSexes only have two values. They represent XY and XX chromosomes.

func (CharacterSex) String

func (i CharacterSex) String() string

type CombatBegan

type CombatBegan struct{}

CombatBegan occurs when a Combat has been initialised.

func (CombatBegan) Type

func (CombatBegan) Type() event.Type

Type of the Event.

type CombatConcluded

type CombatConcluded struct {
	Results map[ecs.Entity]CombatResult
}

CombatConcluded occurs when a Combat is over.

func (CombatConcluded) Type

func (CombatConcluded) Type() event.Type

Type of the Event.

type CombatMapRecipe

type CombatMapRecipe struct {
	Hexes        []CombatMapRecipeHex
	Starts       []geom.Key
	TileW, TileH int
}

type CombatMapRecipeHex

type CombatMapRecipeHex struct {
	Position geom.Key
	Obstacle ObstacleType
	Visuals  []CombatMapRecipeVisual
}

type CombatMapRecipeHexFrame

type CombatMapRecipeHexFrame struct {
	Texture  string
	X, Y     int
	W, H     int
	Duration time.Duration
}

type CombatMapRecipeVisual

type CombatMapRecipeVisual struct {
	Frames           []CombatMapRecipeHexFrame
	XOffset, YOffset int
	Layer            int
	Obscures         []geom.Key
}

type CombatResult

type CombatResult int
const (
	Victorious CombatResult = iota
	Defeated
	Escaped
)

go:generate stringer -type=CombatResult

func (CombatResult) String

func (i CombatResult) String() string

type DamageType

type DamageType int
const (
	PhysicalDamage DamageType = iota
	MagicalDamage
	FireDamage
)

type DiagonalMatrixWipe

type DiagonalMatrixWipe struct {
	W, H          int
	Obscuring     bool
	OnComplete    func()
	OnInitialised func() // Useful for a !Obscuring to load stuff while the screen is hidden.
	// contains filtered or unexported fields
}

DiagonalMatrixWipe obscures the scene by animating in squares of curtain in a diagonal pattern.

func (*DiagonalMatrixWipe) Type

func (*DiagonalMatrixWipe) Type() string

Type of this Component.

type Equipment

type Equipment struct {
	Weapon *ItemInstance

	Helm   *ItemInstance
	Amulet *ItemInstance
	Armor  *ItemInstance
	Ring1  *ItemInstance
	Ring2  *ItemInstance
	Belt   *ItemInstance
	Gloves *ItemInstance
	Boots  *ItemInstance
}

Equipment is a Component that stores the equipped items of a Character.

func (*Equipment) SumModifiers

func (equip *Equipment) SumModifiers() map[Modifier]float64

SumModifiers returns the sum of all modifiers present on all items in this Equipment.

func (*Equipment) Type

func (*Equipment) Type() string

Type of this Component.

func (*Equipment) WeaponActionPoints

func (equip *Equipment) WeaponActionPoints() int

func (*Equipment) WeaponClass

func (equip *Equipment) WeaponClass() ItemClass

WeaponClass returns the inferred ItemClass of the Weapon that is equipped (if one is equipped), otherwise it returns Unarmed.

func (*Equipment) WeaponPreparation

func (equip *Equipment) WeaponPreparation() int

type Facer

type Facer struct {
	Face geom.DirectionType
}

Facer is a Component that represents a direction to face in.

func (*Facer) Type

func (f *Facer) Type() string

Type of this Component.

type FadeIn

type FadeIn struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

FadeIn is a Component that causes an Entity to appear over time.

func (*FadeIn) Type

func (*FadeIn) Type() string

Type of this Component.

type FadeOut

type FadeOut struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

FadeOut is a Component that causes an Entity to disappear from view over time.

func (*FadeOut) Type

func (*FadeOut) Type() string

Type of this Component.

type FadeSystem

type FadeSystem struct{}

FadeSystem controls the Alpha Component of Entities by managing FadeOut and FadeIn Components.

func (*FadeSystem) Update

func (sys *FadeSystem) Update(mgr *ecs.World, elapsed time.Duration)

Update the system.

type FloatAwayAnimation

type FloatAwayAnimation struct {
	// Rate of floating away per second
	Rate float64
	// contains filtered or unexported fields
}

FloatAwayAnimation will offset the Entity upwards based on Rate as if it is a helium balloon floating away.

func (*FloatAwayAnimation) Type

func (*FloatAwayAnimation) Type() string

Type of this Component.

type Font

type Font struct {
	Text string
	Size string // Size should be (small|normal|large)

}

Font is renderable text.

func (*Font) Type

func (*Font) Type() string

Type of this Component.

type FontSystem

type FontSystem struct {
	// contains filtered or unexported fields
}

FontSystem manages the synchronization of Font Components to their composing child entities.

func NewFontSystem

func NewFontSystem(mgr *ecs.World) *FontSystem

NewFontSystem constructs a new FontSystem.

func (*FontSystem) Update

func (s *FontSystem) Update()

Update Fonts in the World.

type Frame

type Frame struct {
	DurationMs int    `json:"durationMs"`
	Sprite     Sprite `json:"sprite"`
}

type FrameAnimation

type FrameAnimation struct {
	Frames  []Sprite
	Timings []time.Duration
	Pointer time.Duration

	// by default, loops forever
	// on end - maybe another animation, maybe a single frame, maybe some behaviour like trigger event
	EndBehavior AnimationEndBehavior
}

FrameAnimation sets the Sprite of the Entity based on how far through the whole Animation is indicated by Pointer.

func NewFrameAnimation

func NewFrameAnimation(a res.Animation) FrameAnimation

NewFrameAnimation creates a new FrameAnimation Component from a res.Animation.

func NewFrameAnimationFromFrames

func NewFrameAnimationFromFrames(frames []Frame) *FrameAnimation

NewFrameAnimationFromFrames creates a new animation from a slice of Frames.

func (*FrameAnimation) Duration

func (fa *FrameAnimation) Duration() time.Duration

Duration of the entire Animation.

func (*FrameAnimation) Index

func (fa *FrameAnimation) Index() int

Index returns the index of the Sprite that Pointer is currently pointing at. It returns -1 if Pointer is negative or the index of one past the last element when Pointer is outside the range of Timings.

func (*FrameAnimation) Randomise

func (fa *FrameAnimation) Randomise() *FrameAnimation

Randomise the starting position of the Pointer.

func (*FrameAnimation) Type

func (*FrameAnimation) Type() string

Type of this Component.

type Hidden

type Hidden struct{}

Hidden is a Component that prevents the Entity from being rendered.

func (*Hidden) Type

func (f *Hidden) Type() string

Type of this Component.

type HoverAnimation

type HoverAnimation struct {
	YVelocity  float64
	YTranslate float64
	Force      float64
}

HoverAnimation makes the entity float up and down.

func NewHoverAnimation

func NewHoverAnimation() *HoverAnimation

NewHoverAnimation creates a new HoverAnimation.

func (*HoverAnimation) Type

func (*HoverAnimation) Type() string

Type of this Component.

type ImageProvider

type ImageProvider interface {
	GetImage(name string) (val image.Image, ok bool)
}

ImageProvider is the contract that the Renderer needs to retrieve images to use for Sprites.

type ItemClass

type ItemClass int

ItemClass is a low-specificity delineation of item.

const (
	UnarmedClass ItemClass = iota
	SwordClass
	AxeClass
	ClubClass
	DaggerClass
	SlingClass
	BowClass
	SpearClass
	PolearmClass
	StaffClass
	WandClass

	HatClass
	BodyArmorClass
	AmuletClass
	RingClass
	GloveClass
	BootClass
	BeltClass
)

func (ItemClass) String

func (i ItemClass) String() string

type ItemInstance

type ItemInstance struct {
	Class     ItemClass
	Name      string
	Modifiers map[Modifier]float64 // base damage, or base armor, or any other modifier
}

ItemInstance is a rolled item that can be equipped.

type Leash

type Leash struct {
	Owner ecs.Entity

	LayerOffset int
}

Leash is a Component that makes the Entity Position follow another Entity's Position.

func (*Leash) Type

func (f *Leash) Type() string

Type of this Component.

type LeashSystem

type LeashSystem struct{}

LeashSystem synchronises the Position of Entities with a Leash Component to their Owner's Positions.

func (*LeashSystem) Update

func (sys *LeashSystem) Update(mgr *ecs.World, elapsed time.Duration)

Update the system.

type Mastery

type Mastery int

Mastery enumerates the types of Masteries or attunements that are available to Characters to learn on their journey.

const (
	// ShortRangeMeleeMastery (Daggers, Swords, Clubs, etc)
	ShortRangeMeleeMastery Mastery = iota
	// LongRangeMeleeMastery (Spears and Polearms)
	LongRangeMeleeMastery
	// RangedCombatMastery (Bows, Slingshots, Javelins, etc)
	RangedCombatMastery
	// CraftsmanshipMastery relates to non-magical utility skills
	CraftsmanshipMastery
	// FireMastery for fire spells
	FireMastery
	// WaterMastery for water spells
	WaterMastery
	// EarthMastery for earth spells
	EarthMastery
	// AirMastery for air spells
	AirMastery
	// LightningMastery for Lightning spells
	LightningMastery
	// DarkMastery for unholy spells
	DarkMastery
	// LightMastery for holy spells
	LightMastery
)

func (Mastery) String

func (i Mastery) String() string

type Modifier

type Modifier int

Modifier enumerates the stat modifiers that appear on items and effects in the game.

const (
	// BaseMinDamageModifier should typically appear only on weapons. It is a
	// value, not a multiplier
	BaseMinDamageModifier Modifier = iota
	// BaseMaxDamageModifier should typically appear only on weapons. It is a
	// value, not a multiplier
	BaseMaxDamageModifier

	// BaseDamageModifier multiplies the base damage before it is multiplied by
	// DamageMultiplierModifier. Should typically only appear on Weapons. Maybe
	// should never go past 99%?
	BaseDamageModifier

	// DamageMultiplierModifier is accumulated from modifiers present on
	// non-weapon items and also core stats.
	DamageMultiplierModifier

	// PreparationModifier is added to the Character's PreparationThreshold.
	PreparationModifier
	//ActionPointModifier is added to the Character's ActionPoint maximum.
	ActionPointModifier
)

func (Modifier) String

func (i Modifier) String() string

type Obstacle

type Obstacle struct {
	M, N int

	ObstacleType ObstacleType
}

Obstacle is a Component that blocks a Hex.

func (*Obstacle) Type

func (o *Obstacle) Type() string

Type of the Component.

type ObstacleType

type ObstacleType int

ObstacleType is an enum.

const (
	NonObstacle ObstacleType = iota
	CharacterObstacle
	CrevasseObstacle
	TreeObstacle
	DeepWaterObstacle
	MudObstacle
)

ObstacleTypes represent the thing that is the obstacle. These might be static obstacle types, like a Tree or Rock, or another Character could be an Obstacle too.

func ParseObstacleType

func ParseObstacleType(s string) (ObstacleType, error)

ParseObstacleType parses an ObstacleType from a string.

func (ObstacleType) String

func (i ObstacleType) String() string

type Position

type Position struct {
	Center Center
	Layer  int

	// Absolute Positioned Components use screen coordinates, not world
	// coordinates.
	Absolute bool
}

Position is a Component that anything with a position in the world has.

func (*Position) Type

func (p *Position) Type() string

Type of this component.

type ProfessionDetails

type ProfessionDetails struct {
	ActionPoints int
	Preparation  int
}

type RenderOffset

type RenderOffset struct {
	X, Y int
}

RenderOffset is a value that offsets the position the Component should be rendered at. It can be used for visual effects or animations that should not affect the real Position of the Entity, just where it appears to be.

func (*RenderOffset) Type

func (s *RenderOffset) Type() string

Type of this Component.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer is a System that draws world-positioned Sprites to the screen.

func NewRenderer

func NewRenderer(images ImageProvider) *Renderer

NewRenderer creates a new Renderer.

func (*Renderer) Render

func (r *Renderer) Render(screen *ebiten.Image, mgr *ecs.World, focusX, focusY, zoom, screenW, screenH float64) error

Render all sprites in the world to the screen. We need to know where in the world we are focused, as well as how zoomed in we are, and the dimensions of the screen.

type Scale

type Scale struct {
	X, Y float64
}

Scale defines a multiplier that is applied to the Entity's size.

func (*Scale) Type

func (*Scale) Type() string

Type of this Component.

type SceneWipeSystem

type SceneWipeSystem struct{}

SceneWipeSystem handles scene wipe Components that hide abrupt changes to the scene by fading in and out. Think of these as curtains that can be drawn to hide stage hands moving pieces of the set on and off the stage.

func NewSceneWipeSystem

func NewSceneWipeSystem() *SceneWipeSystem

NewSceneWipeSystem constructs a SceneWipeSystem.

func (*SceneWipeSystem) Update

func (cs *SceneWipeSystem) Update(mgr *ecs.World, elapsed time.Duration)

Update all scene wipe Components in the passed ecs.World.

type SomethingInteresting

type SomethingInteresting struct {
	X, Y float64
}

SomethingInteresting occurs when something interesting has occurred. The camera may want to focus on X,Y.

func (SomethingInteresting) Type

func (SomethingInteresting) Type() event.Type

Type of the Event.

type Sprite

type Sprite struct {
	Texture string `json:"texture"`
	X       int    `json:"x"`
	Y       int    `json:"y"`
	W       int    `json:"w"`
	H       int    `json:"h"`

	// OffsetX and OffsetY exist as they can be applied to individual frames of
	// an animation. They do not duplicate the functionality of RenderOffset, as
	// that applies at the Entity level, and could effect the rendering position
	// of things that are not Sprites. (i.e shape primitives)
	OffsetX int `json:"offsetX"`
	OffsetY int `json:"offsetY"`
}

Sprite is a renderable slice of a texture.

func (Sprite) AsAnimation

func (s Sprite) AsAnimation() *FrameAnimation

AsAnimation wraps the Sprite in a FrameAnimation that only has a single frame. This is function is helpful when you have an interface that requires a FrameAnimation but you only want a single, static frame to be displayed.

func (*Sprite) Type

func (s *Sprite) Type() string

Type of this Component.

type SpriteRepeat

type SpriteRepeat struct {
	W, H int
}

SpriteRepeat is a component that repeats (or "tiles") a sprite across a width and height.

func (*SpriteRepeat) Type

func (*SpriteRepeat) Type() string

Type of this Component.

type Squad

type Squad struct {
	Members []ecs.Entity
}

Squad is a Component that marks a Squad of Characters

func (*Squad) Type

func (*Squad) Type() string

Type of this Component.

type StatType

type StatType int
const (
	HPStat StatType = iota
	EnergyStat
	ActionStat
	PrepStat
)

go:generate stringer -type=StatType

func (StatType) String

func (i StatType) String() string

type TakeDamageAnimation

type TakeDamageAnimation struct {
	// contains filtered or unexported fields
}

TakeDamageAnimation adds an offset that makes the Entity pendulum back and forth on the X axis as if they have been struck.

func (*TakeDamageAnimation) Type

func (*TakeDamageAnimation) Type() string

Type of this Component.

type Team

type Team struct {
	ID      int64
	Control TeamControl
}

Team is a Component that represents a grouping of Characters that work together, and share a source of control.

func NewTeam

func NewTeam() *Team

NewTeam creates a new team.

func (*Team) Type

func (*Team) Type() string

Type of this Component.

type TeamControl

type TeamControl int

TeamControl marks the source of control.

const (
	// LocalControl means that the player is controlling this team.
	LocalControl TeamControl = iota

	// NoControl is for things that do not move
	NoControl

	// ComputerControl means that an AI script is controlling this team.
	ComputerControl
)

func (TeamControl) String

func (i TeamControl) String() string

type WindowSizeChanged

type WindowSizeChanged struct {
	OldW, OldH int
	NewW, NewH int
}

WindowSizeChanged occurs when the size of the window the game is running in changes.

func (WindowSizeChanged) Type

func (WindowSizeChanged) Type() event.Type

Type of the Event.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier