Documentation
¶
Index ¶
- Constants
- func JumpJetSFXForMech(m *model.Mech) (string, error)
- func NewUIResources(fonts *fonts) (*uiResources, error)
- func StompSFXForMech(m *model.Mech) (string, error)
- type AIBehavior
- func (a *AIBehavior) DetermineForcedWithdrawal() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) FireWeapons() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) GuardArea() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) GuardUnit() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) HasTarget() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) HuntLastTargetArea() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) InWithdrawArea() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) LoadBehaviorTree(ai string, aiRes AIResources) bt.Node
- func (a *AIBehavior) PatrolPath() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) TargetIsAlive() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) Tick() (bt.Status, error)
- func (a *AIBehavior) TurnToTarget() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) TurnToWithdraw() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) TurretToTarget() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) VelocityToMax() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) Wander() func([]bt.Node) (bt.Status, error)
- func (a *AIBehavior) Withdraw() func([]bt.Node) (bt.Status, error)
- type AIDecoratorType
- type AIFormation
- type AIGunnery
- type AIHandler
- type AIInitiative
- type AINodeID
- type AINodeType
- type AIPathing
- type AIPiloting
- type AIResourceNode
- type AIResourceProperties
- type AIResourceTree
- type AIResources
- type AudioHandler
- func (a *AudioHandler) EngineAmbience() _sfxTypeHint
- func (a *AudioHandler) IsButtonAudioPlaying() bool
- func (a *AudioHandler) IsMusicPlaying() bool
- func (a *AudioHandler) PauseMusic()
- func (a *AudioHandler) PauseSFX()
- func (a *AudioHandler) PlayButtonAudio(buttonResource AudioInterfaceResource)
- func (a *AudioHandler) PlayEffectAudio(g *Game, p *render.EffectSprite)
- func (a *AudioHandler) PlayEntityAudioLoop(g *Game, sfxFile string, entity model.Entity, intensityDist, maxVolume float64)
- func (a *AudioHandler) PlayExternalAudio(g *Game, sfxFile string, ...)
- func (a *AudioHandler) PlayExternalWeaponFireAudio(g *Game, weapon model.Weapon, extUnit model.Unit)
- func (a *AudioHandler) PlayLocalWeaponFireAudio(weapon model.Weapon)
- func (a *AudioHandler) PlayLoopEntitySFX(sfxFile string, entity model.Entity, sourceVolume, panPercent float64)
- func (a *AudioHandler) PlayPowerOffSequence()
- func (a *AudioHandler) PlayPowerOnSequence()
- func (a *AudioHandler) PlayProjectileImpactAudio(g *Game, p *render.ProjectileSprite)
- func (a *AudioHandler) PlaySFX(sfxFile string, sourceVolume, panPercent float64)
- func (a *AudioHandler) ResumeMusic()
- func (a *AudioHandler) ResumeSFX()
- func (a *AudioHandler) SetMusicVolume(strength float64)
- func (a *AudioHandler) SetSFXChannels(numChannels int)
- func (a *AudioHandler) SetSFXVolume(strength float64)
- func (a *AudioHandler) SetStompSFX(sfxFile string)
- func (a *AudioHandler) StartEngineAmbience()
- func (a *AudioHandler) StartMenuMusic()
- func (a *AudioHandler) StartMusicFromFile(path string)
- func (a *AudioHandler) StopEngineAmbience()
- func (a *AudioHandler) StopEntityAudioLoop(g *Game, sfxFile string, entity model.Entity)
- func (a *AudioHandler) StopLoopEntitySFX(sfxFile string, entity model.Entity)
- func (a *AudioHandler) StopMusic()
- func (a *AudioHandler) StopSFX()
- type AudioInterfaceResource
- type AudioMainSource
- type BGMHandler
- type BasicObjective
- type ClutterHandler
- type DebriefMenu
- type DestroyObjective
- type DustoffObjective
- type EntityCollision
- type FloorTexture
- type Game
- func (g *Game) CameraLine3dTo(posX, posY, posZ float64) *geom3d.Line3d
- func (g *Game) CameraLineTo(posX, posY float64) *geom.Line
- func (g *Game) Draw(screen *ebiten.Image)
- func (g *Game) GetHUDElement(t HUDElementType) HUDElement
- func (g *Game) InProgress() bool
- func (g *Game) IsFriendly(e1, e2 model.Entity) bool
- func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int)
- func (g *Game) LeaveGame()
- func (g *Game) LoadMission(missionFile string) (*model.Mission, error)
- func (g *Game) LoadUnit(unitResourceType, unitFile string) model.Unit
- func (g *Game) RandomUnit(unitResourceType string) model.Unit
- func (g *Game) Resources() *model.ModelResources
- func (g *Game) Run()
- func (g *Game) SetPlayerUnit(unit model.Unit)
- func (g *Game) SetScene(scene Scene)
- func (g *Game) Update() error
- func (g *Game) UpdateSprites()
- type GameMenu
- type GameScene
- type HUDElement
- type HUDElementType
- type InstantActionScene
- type IntroScene
- type LaunchMenu
- type LogFormat
- type MainMenu
- type Menu
- type MenuAspectRatio
- type MenuModel
- func (m *MenuModel) Active() bool
- func (m *MenuModel) CloseWindow() *widget.Window
- func (m *MenuModel) Closing() bool
- func (m *MenuModel) FontScale() float64
- func (m *MenuModel) Game() *Game
- func (m *MenuModel) MarginX() int
- func (m *MenuModel) MarginY() int
- func (m *MenuModel) Padding() int
- func (m *MenuModel) Resolutions() []MenuResolution
- func (m *MenuModel) Resources() *uiResources
- func (m *MenuModel) Root() *widget.Container
- func (m *MenuModel) SetWindow(window *widget.Window)
- func (m *MenuModel) Spacing() int
- func (m *MenuModel) UI() *ebitenui.UI
- type MenuResolution
- type MenuScene
- type MissionCard
- type MissionCardStyle
- type MissionDebriefScene
- type MissionMenu
- type MouseMode
- type Objective
- type ObjectivesHandler
- type ObjectivesStatus
- type Player
- func (p *Player) CameraPosXY() (pos *geom.Vector2)
- func (p *Player) CameraPosition() (pos *geom.Vector2, posZ, angle, pitch float64)
- func (p *Player) DebugCameraTarget() (t model.Unit)
- func (p *Player) Eject(g *Game) bool
- func (p *Player) HasTurret() bool
- func (p *Player) Heading() float64
- func (p *Player) NavPoint() *model.NavPoint
- func (p *Player) PitchCamera(pSpeed float64)
- func (p *Player) PosZ() float64
- func (p *Player) RotateCamera(rSpeed float64)
- func (p *Player) SetDebugCameraTarget(t model.Unit)
- func (p *Player) SetHeading(angle float64)
- func (p *Player) SetPosZ(z float64)
- func (p *Player) SetTargetRelativeHeading(rHeading float64)
- func (p *Player) TurretAngle() float64
- func (p *Player) Update() bool
- type PlayerAliveObjective
- type ProjectileSpawn
- type ProtectObjective
- type SFXHandler
- type SFXSource
- func (s *SFXSource) Close()
- func (s *SFXSource) IsPlaying() bool
- func (s *SFXSource) LoadLoopSFX(a *AudioHandler, sfxFile string) error
- func (s *SFXSource) LoadSFX(a *AudioHandler, sfxFile string) error
- func (s *SFXSource) Pause()
- func (s *SFXSource) Play()
- func (s *SFXSource) Resume()
- func (s *SFXSource) SetPan(panPercent float64)
- func (s *SFXSource) SetSourceVolume(sourceVolume float64)
- func (s *SFXSource) UpdateVolume()
- type Scene
- type SceneEffect
- type SceneShader
- type SceneTransition
- type SettingsMenu
- type SplashScene
- type SplashScreen
- type SpriteHandler
- type SpriteType
- type StrideDirection
- type TargetCycleType
- type TextureHandler
- type UnitCard
- type UnitCardStyle
- type UnitMenu
- type VisitObjective
Constants ¶
const ( // AI_INITIATIVE_SLOTS represents the limited number of initiative time slots an AI can be updated (every N ticks) AI_INITIATIVE_SLOTS = 4 // AI_INITIATIVE_TIMER is how many ticks between rerolling initiative slots AI_INITIATIVE_TIMER = 300 )
const ( PARAM_KEY_DEBUG = "debug" CONFIG_KEY_SHOW_FPS = "show_fps" CONFIG_KEY_SCREEN_WIDTH = "screen.width" CONFIG_KEY_SCREEN_HEIGHT = "screen.height" CONFIG_KEY_RENDER_SCALE = "screen.render_scale" CONFIG_KEY_FOV_DEGREES = "screen.fov_degrees" CONFIG_KEY_FULLSCREEN = "screen.fullscreen" CONFIG_KEY_VSYNC = "screen.vsync" CONFIG_KEY_RENDER_FLOOR = "screen.render_floor" CONFIG_KEY_RENDER_DISTANCE = "screen.render_distance" CONFIG_KEY_CLUTTER_DISTANCE = "screen.clutter_distance" CONFIG_KEY_OPENGL = "screen.opengl" CONFIG_KEY_CRT_SHADER = "screen.crt_shader" CONFIG_KEY_HUD_ENABLED = "hud.enabled" CONFIG_KEY_HUD_SCALE = "hud.scale" CONFIG_KEY_HUD_FONT = "hud.font" CONFIG_KEY_HUD_COLOR_CUSTOM = "hud.color.use_custom" CONFIG_KEY_HUD_COLOR_R = "hud.color.red" CONFIG_KEY_HUD_COLOR_G = "hud.color.green" CONFIG_KEY_HUD_COLOR_B = "hud.color.blue" CONFIG_KEY_HUD_COLOR_A = "hud.color.alpha" CONFIG_KEY_HUD_CROSSHAIR_INDEX = "hud.crosshair.index" CONFIG_KEY_AUDIO_BGM_VOL = "audio.bgm_volume" CONFIG_KEY_AUDIO_SFX_VOL = "audio.sfx_volume" CONFIG_KEY_AUDIO_SFX_CHANNELS = "audio.sfx_channels" CONFIG_KEY_CONTROL_DECAY = "controls.throttle_decay" )
const ( ActionUnknown input.Action = iota ActionUp ActionDown ActionLeft ActionRight ActionMoveAxes ActionTurretUp ActionTurretDown ActionTurretLeft ActionTurretRight ActionTurretAxes ActionMenu ActionBack ActionThrottleReverse ActionThrottle0 ActionJumpJet ActionDescend ActionWeaponFire ActionWeaponCycle ActionWeaponGroupFireToggle ActionWeaponGroupSetModifier ActionWeaponGroup1 ActionWeaponGroup2 ActionWeaponGroup3 ActionWeaponGroup4 ActionWeaponGroup5 ActionWeaponFireGroup1 ActionWeaponFireGroup2 ActionWeaponFireGroup3 ActionWeaponFireGroup4 ActionWeaponFireGroup5 ActionRadarRangeCycle ActionTargetCrosshairs ActionTargetNearest ActionTargetNext ActionTargetPrevious ActionZoomToggle ActionLightAmpToggle ActionPowerToggle ActionCameraCycle )
const ( StrideStompLeft = -1 StrideStompRight = 1 StrideStompBoth = 0 )
const (
SPLASH_TIMEOUT = 5.0
)
Variables ¶
This section is empty.
Functions ¶
func NewUIResources ¶
func NewUIResources(fonts *fonts) (*uiResources, error)
Types ¶
type AIBehavior ¶ added in v0.0.6
func (*AIBehavior) DetermineForcedWithdrawal ¶ added in v0.0.6
func (*AIBehavior) FireWeapons ¶ added in v0.0.6
func (*AIBehavior) HuntLastTargetArea ¶ added in v0.0.6
func (*AIBehavior) InWithdrawArea ¶ added in v0.0.6
func (*AIBehavior) LoadBehaviorTree ¶ added in v0.0.6
func (a *AIBehavior) LoadBehaviorTree(ai string, aiRes AIResources) bt.Node
func (*AIBehavior) PatrolPath ¶ added in v0.0.6
func (*AIBehavior) TargetIsAlive ¶ added in v0.0.6
func (*AIBehavior) TurnToTarget ¶ added in v0.0.6
func (*AIBehavior) TurnToWithdraw ¶ added in v0.0.6
func (*AIBehavior) TurretToTarget ¶ added in v0.0.6
func (*AIBehavior) VelocityToMax ¶ added in v0.0.6
type AIDecoratorType ¶ added in v0.0.6
type AIDecoratorType int
const ( AI_DECORATOR_NONE AIDecoratorType = iota AI_DECORATOR_NEGATE )
func (AIDecoratorType) String ¶ added in v0.0.6
func (t AIDecoratorType) String() string
type AIFormation ¶ added in v0.0.6
type AIFormation struct {
// contains filtered or unexported fields
}
func (*AIFormation) AddUnit ¶ added in v0.0.6
func (f *AIFormation) AddUnit(u model.Unit)
func (*AIFormation) SetLeader ¶ added in v0.0.6
func (f *AIFormation) SetLeader(u model.Unit)
type AIGunnery ¶ added in v0.0.6
type AIGunnery struct {
// contains filtered or unexported fields
}
type AIHandler ¶ added in v0.0.6
type AIHandler struct {
// contains filtered or unexported fields
}
func NewAIHandler ¶ added in v0.0.6
func (*AIHandler) LoadFormations ¶ added in v0.0.6
func (h *AIHandler) LoadFormations()
func (*AIHandler) NewAI ¶ added in v0.0.6
func (h *AIHandler) NewAI(u model.Unit, ai string, aiRes AIResources) *AIBehavior
type AIInitiative ¶ added in v0.0.6
type AIInitiative struct {
// contains filtered or unexported fields
}
func NewAIInitiative ¶ added in v0.0.6
func NewAIInitiative(aiList []*AIBehavior) *AIInitiative
func (*AIInitiative) Next ¶ added in v0.0.6
func (n *AIInitiative) Next() []*AIBehavior
type AINodeType ¶ added in v0.0.6
type AINodeType int
const ( AI_NODE_DEFAULT AINodeType = iota AI_NODE_TREE )
func (AINodeType) String ¶ added in v0.0.6
func (t AINodeType) String() string
func (*AINodeType) UnmarshalText ¶ added in v0.0.6
func (t *AINodeType) UnmarshalText(b []byte) error
Unmarshals into AINodeType
type AIPathing ¶ added in v0.0.6
type AIPathing struct {
// contains filtered or unexported fields
}
type AIPiloting ¶ added in v0.0.6
type AIPiloting struct {
// contains filtered or unexported fields
}
func (*AIPiloting) Reset ¶ added in v0.0.6
func (p *AIPiloting) Reset()
type AIResourceNode ¶ added in v0.0.6
type AIResourceProperties ¶ added in v0.0.6
type AIResourceProperties struct {
Type AINodeType
}
type AIResourceTree ¶ added in v0.0.6
type AIResourceTree struct { Title string `json:"title" validate:"required"` Root AINodeID `json:"root" validate:"required"` Nodes map[AINodeID]AIResourceNode `json:"nodes" validate:"required"` }
type AIResources ¶ added in v0.0.6
type AIResources struct {
Trees map[string]AIResourceTree
}
type AudioHandler ¶
type AudioHandler struct {
// contains filtered or unexported fields
}
func NewAudioHandler ¶
func NewAudioHandler() *AudioHandler
NewAudioHandler creates a new audio handler instance
func (*AudioHandler) EngineAmbience ¶
func (a *AudioHandler) EngineAmbience() _sfxTypeHint
IsEngineAmbience indicates whether the current engine audio is the ambience loop
func (*AudioHandler) IsButtonAudioPlaying ¶
func (a *AudioHandler) IsButtonAudioPlaying() bool
IsButtonAudioPlaying returns true if the button audio channel is still playing
func (*AudioHandler) IsMusicPlaying ¶
func (a *AudioHandler) IsMusicPlaying() bool
IsMusicPlaying return true if background music is currently playing
func (*AudioHandler) PauseMusic ¶
func (a *AudioHandler) PauseMusic()
PauseMusic pauses play of background music
func (*AudioHandler) PauseSFX ¶
func (a *AudioHandler) PauseSFX()
PauseSFX pauses all sound effect sources
func (*AudioHandler) PlayButtonAudio ¶
func (a *AudioHandler) PlayButtonAudio(buttonResource AudioInterfaceResource)
PlayButtonAudio plays the indicated button audio channel resource
func (*AudioHandler) PlayEffectAudio ¶
func (a *AudioHandler) PlayEffectAudio(g *Game, p *render.EffectSprite)
PlayEffectAudio plays effect audio near the player
func (*AudioHandler) PlayEntityAudioLoop ¶
func (a *AudioHandler) PlayEntityAudioLoop(g *Game, sfxFile string, entity model.Entity, intensityDist, maxVolume float64)
PlayEntityAudioLoop plays audio that may be near the player emitted from an Entity object intensityDist - distance of 100% sound intensity before volume begins to dropoff at a rate of 1/d^2 maxVolume - the maximum volume percent to be perceived by the player
func (*AudioHandler) PlayExternalAudio ¶
func (a *AudioHandler) PlayExternalAudio(g *Game, sfxFile string, extPosX, extPosY, extPosZ, intensityDist, maxVolume float64)
PlayExternalAudio plays audio that may be near the player taking into account distance/direction for volume/panning intensityDist - distance of 100% sound intensity before volume begins to dropoff at a rate of 1/d^2 maxVolume - the maximum volume percent to be perceived by the player
func (*AudioHandler) PlayExternalWeaponFireAudio ¶
func (a *AudioHandler) PlayExternalWeaponFireAudio(g *Game, weapon model.Weapon, extUnit model.Unit)
PlayExternalWeaponFireAudio plays weapon fire audio fired by units other than the player
func (*AudioHandler) PlayLocalWeaponFireAudio ¶
func (a *AudioHandler) PlayLocalWeaponFireAudio(weapon model.Weapon)
PlayLocalWeaponFireAudio plays weapon fire audio intended only if fired by the player unit
func (*AudioHandler) PlayLoopEntitySFX ¶
func (a *AudioHandler) PlayLoopEntitySFX(sfxFile string, entity model.Entity, sourceVolume, panPercent float64)
PlayLoopEntitySFX plays given looping sound effect as emitted from an Entity object, if not already playing
func (*AudioHandler) PlayPowerOffSequence ¶
func (a *AudioHandler) PlayPowerOffSequence()
PlayPowerOffSequence plays the power down sound using the engine audio source
func (*AudioHandler) PlayPowerOnSequence ¶
func (a *AudioHandler) PlayPowerOnSequence()
PlayPowerOnSequence plays the power on sound using the engine audio source
func (*AudioHandler) PlayProjectileImpactAudio ¶
func (a *AudioHandler) PlayProjectileImpactAudio(g *Game, p *render.ProjectileSprite)
PlayProjectileImpactAudio plays projectile impact audio near the player
func (*AudioHandler) PlaySFX ¶
func (a *AudioHandler) PlaySFX(sfxFile string, sourceVolume, panPercent float64)
PlaySFX plays given external sound effect file
func (*AudioHandler) ResumeMusic ¶
func (a *AudioHandler) ResumeMusic()
ResumeMusic resumes play of background music
func (*AudioHandler) ResumeSFX ¶
func (a *AudioHandler) ResumeSFX()
ResumeSFX resumes play of all sound effect sources
func (*AudioHandler) SetMusicVolume ¶
func (a *AudioHandler) SetMusicVolume(strength float64)
SetMusicVolume sets volume of background music
func (*AudioHandler) SetSFXChannels ¶
func (a *AudioHandler) SetSFXChannels(numChannels int)
SetSFXChannels sets max number of external sound effect channels
func (*AudioHandler) SetSFXVolume ¶
func (a *AudioHandler) SetSFXVolume(strength float64)
SetSFXVolume sets volume of all sound effect sources
func (*AudioHandler) SetStompSFX ¶
func (a *AudioHandler) SetStompSFX(sfxFile string)
func (*AudioHandler) StartEngineAmbience ¶
func (a *AudioHandler) StartEngineAmbience()
StartEngineAmbience starts the ambient engine audio loop
func (*AudioHandler) StartMenuMusic ¶
func (a *AudioHandler) StartMenuMusic()
StartMenuMusic starts main menu background music audio loop
func (*AudioHandler) StartMusicFromFile ¶
func (a *AudioHandler) StartMusicFromFile(path string)
StartMusicFromFile starts background music audio loop
func (*AudioHandler) StopEngineAmbience ¶
func (a *AudioHandler) StopEngineAmbience()
StopEngineAmbience stop the ambient engine audio loop
func (*AudioHandler) StopEntityAudioLoop ¶
func (a *AudioHandler) StopEntityAudioLoop(g *Game, sfxFile string, entity model.Entity)
StopEntityAudioLoop stops audio emitted from an Entity object that may have been playing
func (*AudioHandler) StopLoopEntitySFX ¶
func (a *AudioHandler) StopLoopEntitySFX(sfxFile string, entity model.Entity)
StopLoopEntitySFX stops given looping sound effect as emitted from an Entity object
func (*AudioHandler) StopMusic ¶
func (a *AudioHandler) StopMusic()
StopMusic stops and closes the background music source
func (*AudioHandler) StopSFX ¶
func (a *AudioHandler) StopSFX()
StopSFX stops and closes all sound effect sources
type AudioInterfaceResource ¶
type AudioInterfaceResource string
const ( AUDIO_BUTTON_AFF AudioInterfaceResource = "audio/sfx/button-aff.ogg" AUDIO_BUTTON_NEG AudioInterfaceResource = "audio/sfx/button-neg.ogg" AUDIO_BUTTON_OVER AudioInterfaceResource = "audio/sfx/button-over.ogg" AUDIO_CLICK_AFF AudioInterfaceResource = "audio/sfx/click-aff.ogg" AUDIO_CLICK_NEG AudioInterfaceResource = "audio/sfx/click-neg.ogg" AUDIO_SELECT_TARGET AudioInterfaceResource = "audio/sfx/select-target.ogg" )
type AudioMainSource ¶
type AudioMainSource int
const ( AUDIO_INTERFACE AudioMainSource = iota AUDIO_ENGINE AUDIO_STOMP_LEFT AUDIO_STOMP_RIGHT AUDIO_JUMP_JET )
type BGMHandler ¶
type BGMHandler struct {
// contains filtered or unexported fields
}
type BasicObjective ¶ added in v0.0.1
type BasicObjective struct {
// contains filtered or unexported fields
}
func (*BasicObjective) Completed ¶ added in v0.0.1
func (o *BasicObjective) Completed() bool
func (*BasicObjective) Current ¶ added in v0.0.1
func (o *BasicObjective) Current() bool
func (*BasicObjective) Failed ¶ added in v0.0.1
func (o *BasicObjective) Failed() bool
type ClutterHandler ¶
type ClutterHandler struct {
// contains filtered or unexported fields
}
func NewClutterHandler ¶
func NewClutterHandler() *ClutterHandler
func (*ClutterHandler) Update ¶
func (c *ClutterHandler) Update(g *Game, forceUpdate bool)
type DebriefMenu ¶ added in v0.0.1
type DebriefMenu struct { *MenuModel // contains filtered or unexported fields }
func (*DebriefMenu) Draw ¶ added in v0.0.1
func (m *DebriefMenu) Draw(screen *ebiten.Image)
func (*DebriefMenu) Update ¶ added in v0.0.1
func (m *DebriefMenu) Update()
type DestroyObjective ¶ added in v0.0.1
type DestroyObjective struct { *BasicObjective // contains filtered or unexported fields }
func (*DestroyObjective) Text ¶ added in v0.0.1
func (o *DestroyObjective) Text() string
func (*DestroyObjective) Update ¶ added in v0.0.1
func (o *DestroyObjective) Update(g *Game)
type DustoffObjective ¶ added in v0.0.1
type DustoffObjective struct { *BasicObjective // contains filtered or unexported fields }
func (*DustoffObjective) Text ¶ added in v0.0.1
func (o *DustoffObjective) Text() string
func (*DustoffObjective) Update ¶ added in v0.0.1
func (o *DustoffObjective) Update(g *Game)
type EntityCollision ¶
type EntityCollision struct {
// contains filtered or unexported fields
}
type FloorTexture ¶
type FloorTexture struct {
// contains filtered or unexported fields
}
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game - This is the main type for your game.
func NewGame ¶
func NewGame() *Game
NewGame - Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
func (*Game) CameraLine3dTo ¶ added in v0.0.1
CameraLine3dTo returns a 3D Line of the current camera position to the given position
func (*Game) CameraLineTo ¶ added in v0.0.1
CameraLineTo returns a 2D Line of the current camera position to the given position
func (*Game) Draw ¶
func (g *Game) Draw(screen *ebiten.Image)
Draw draws the game screen. Draw is called every frame (typically 1/60[s] for 60Hz display).
func (*Game) GetHUDElement ¶
func (g *Game) GetHUDElement(t HUDElementType) HUDElement
func (*Game) InProgress ¶ added in v0.0.1
func (*Game) Layout ¶
Layout takes the outside size (e.g., the window size) and returns the (logical) screen size. If you don't have to adjust the screen size with the outside size, just return a fixed size.
func (*Game) LoadMission ¶ added in v0.0.4
func (*Game) RandomUnit ¶ added in v0.0.4
func (*Game) Resources ¶ added in v0.0.4
func (g *Game) Resources() *model.ModelResources
func (*Game) SetPlayerUnit ¶
func (*Game) Update ¶
Update - Allows the game to run logic such as updating the world, gathering input, and playing audio. Update is called every tick (1/60 [s] by default).
func (*Game) UpdateSprites ¶ added in v0.0.6
func (g *Game) UpdateSprites()
type GameScene ¶ added in v0.0.1
type GameScene struct { Game *Game // contains filtered or unexported fields }
func NewGameScene ¶ added in v0.0.1
type HUDElement ¶
type HUDElementType ¶
type HUDElementType int
const ( HUD_FPS HUDElementType = iota HUD_BANNER HUD_ALTIMETER HUD_ARMAMENT HUD_COMPASS HUD_CROSSHAIRS HUD_HEAT HUD_JETS HUD_NAV_RETICLE HUD_NAV_STATUS HUD_PLAYER_STATUS HUD_RADAR HUD_FRIENDLY_RETICLE HUD_TARGET_RETICLE HUD_TARGET_STATUS HUD_THROTTLE TOTAL_HUD_ELEMENT_TYPES )
type InstantActionScene ¶
type InstantActionScene struct { Game *Game // contains filtered or unexported fields }
func NewInstantActionScene ¶
func NewInstantActionScene(g *Game) *InstantActionScene
func (*InstantActionScene) Draw ¶
func (s *InstantActionScene) Draw(screen *ebiten.Image)
func (*InstantActionScene) SetMenu ¶
func (s *InstantActionScene) SetMenu(m Menu)
func (*InstantActionScene) Update ¶
func (s *InstantActionScene) Update() error
type IntroScene ¶
type IntroScene struct { Game *Game // contains filtered or unexported fields }
func NewIntroScene ¶
func NewIntroScene(g *Game) *IntroScene
func (*IntroScene) Draw ¶
func (s *IntroScene) Draw(screen *ebiten.Image)
func (*IntroScene) Update ¶
func (s *IntroScene) Update() error
type LaunchMenu ¶
type LaunchMenu struct { *MenuModel // contains filtered or unexported fields }
func (*LaunchMenu) Draw ¶
func (m *LaunchMenu) Draw(screen *ebiten.Image)
func (*LaunchMenu) Update ¶
func (m *LaunchMenu) Update()
type Menu ¶
type Menu interface { Active() bool Closing() bool UI() *ebitenui.UI Root() *widget.Container SetWindow(*widget.Window) CloseWindow() *widget.Window Resources() *uiResources Game() *Game FontScale() float64 MarginX() int MarginY() int Padding() int Spacing() int Resolutions() []MenuResolution Update() Draw(screen *ebiten.Image) }
type MenuAspectRatio ¶
type MenuAspectRatio struct {
// contains filtered or unexported fields
}
type MenuModel ¶
type MenuModel struct {
// contains filtered or unexported fields
}
func (*MenuModel) CloseWindow ¶
func (*MenuModel) Resolutions ¶
func (m *MenuModel) Resolutions() []MenuResolution
type MenuResolution ¶
type MenuResolution struct {
// contains filtered or unexported fields
}
func (MenuResolution) String ¶
func (r MenuResolution) String() string
type MenuScene ¶
type MenuScene struct { Game *Game // contains filtered or unexported fields }
func NewMenuScene ¶
type MissionCard ¶
type MissionCardStyle ¶
type MissionCardStyle int
const ( MissionCardSelect MissionCardStyle = iota MissionCardLaunch MissionCardGame MissionCardDebrief )
type MissionDebriefScene ¶ added in v0.0.1
type MissionDebriefScene struct { Game *Game // contains filtered or unexported fields }
func NewMissionDebriefScene ¶ added in v0.0.1
func NewMissionDebriefScene(g *Game) *MissionDebriefScene
func (*MissionDebriefScene) Draw ¶ added in v0.0.1
func (s *MissionDebriefScene) Draw(screen *ebiten.Image)
func (*MissionDebriefScene) SetMenu ¶ added in v0.0.1
func (s *MissionDebriefScene) SetMenu(m Menu)
func (*MissionDebriefScene) Update ¶ added in v0.0.1
func (s *MissionDebriefScene) Update() error
type MissionMenu ¶
type MissionMenu struct { *MenuModel // contains filtered or unexported fields }
func (*MissionMenu) Draw ¶
func (m *MissionMenu) Draw(screen *ebiten.Image)
func (*MissionMenu) Update ¶
func (m *MissionMenu) Update()
type ObjectivesHandler ¶ added in v0.0.1
type ObjectivesHandler struct {
// contains filtered or unexported fields
}
func NewObjectivesHandler ¶ added in v0.0.1
func NewObjectivesHandler(g *Game, objectives *model.MissionObjectives) *ObjectivesHandler
func (*ObjectivesHandler) Status ¶ added in v0.0.1
func (o *ObjectivesHandler) Status() ObjectivesStatus
func (*ObjectivesHandler) Text ¶ added in v0.0.1
func (o *ObjectivesHandler) Text() string
func (*ObjectivesHandler) Update ¶ added in v0.0.1
func (o *ObjectivesHandler) Update(g *Game)
type ObjectivesStatus ¶ added in v0.0.1
type ObjectivesStatus int
const ( OBJECTIVES_IN_PROGRESS ObjectivesStatus = iota OBJECTIVES_COMPLETED OBJECTIVES_FAILED )
type Player ¶
func (*Player) CameraPosXY ¶ added in v0.0.6
func (*Player) CameraPosition ¶
func (*Player) DebugCameraTarget ¶ added in v0.0.6
func (*Player) PitchCamera ¶ added in v0.0.1
Pitch camera, relative to current pitch, by rotation speed
func (*Player) RotateCamera ¶ added in v0.0.1
Rotate camera, relative to current angle, by rotation speed
func (*Player) SetDebugCameraTarget ¶ added in v0.0.6
func (*Player) SetHeading ¶ added in v0.0.1
func (*Player) SetTargetRelativeHeading ¶ added in v0.0.1
func (*Player) TurretAngle ¶ added in v0.0.1
type PlayerAliveObjective ¶ added in v0.0.1
type PlayerAliveObjective struct {
*BasicObjective
}
func (*PlayerAliveObjective) Text ¶ added in v0.0.1
func (o *PlayerAliveObjective) Text() string
func (*PlayerAliveObjective) Update ¶ added in v0.0.1
func (o *PlayerAliveObjective) Update(g *Game)
type ProjectileSpawn ¶ added in v0.0.6
type ProjectileSpawn struct {
// contains filtered or unexported fields
}
func NewDelayedProjectileSpawn ¶ added in v0.0.6
func NewProjectileSpawn ¶ added in v0.0.6
func NewProjectileSpawn(weapon model.Weapon, parent model.Entity) *ProjectileSpawn
type ProtectObjective ¶ added in v0.0.1
type ProtectObjective struct { *BasicObjective // contains filtered or unexported fields }
func (*ProtectObjective) Text ¶ added in v0.0.1
func (o *ProtectObjective) Text() string
func (*ProtectObjective) Update ¶ added in v0.0.1
func (o *ProtectObjective) Update(g *Game)
type SFXHandler ¶
type SFXHandler struct {
// contains filtered or unexported fields
}
type SFXSource ¶
type SFXSource struct {
// contains filtered or unexported fields
}
func NewSoundEffectSource ¶
NewSoundEffectSource creates a new sound effect channel
func (*SFXSource) Close ¶
func (s *SFXSource) Close()
Close stops and closes the sound effect player
func (*SFXSource) LoadLoopSFX ¶
func (s *SFXSource) LoadLoopSFX(a *AudioHandler, sfxFile string) error
LoadLoopSFX loads a new looping sound effect player into the sound effect channel
func (*SFXSource) LoadSFX ¶
func (s *SFXSource) LoadSFX(a *AudioHandler, sfxFile string) error
LoadSFX loads a new sound effect player into the sound effect channel
func (*SFXSource) Play ¶
func (s *SFXSource) Play()
Play starts playing the sound effect player from the beginning of the effect
func (*SFXSource) Resume ¶
func (s *SFXSource) Resume()
Resume resumes the sound effect player without rewinding
func (*SFXSource) SetSourceVolume ¶
SetSourceVolume sets the relative volume modifier of the sound channel
func (*SFXSource) UpdateVolume ¶
func (s *SFXSource) UpdateVolume()
UpdateVolume updates the volume of the sound channel taking into account relative volume modifier
type SceneEffect ¶
type SceneEffect interface { Update() error Draw(screen *ebiten.Image) }
type SceneShader ¶ added in v0.0.1
type SceneShader interface { Update() error Draw(screen, img *ebiten.Image) }
type SceneTransition ¶
type SettingsMenu ¶
type SettingsMenu struct { *MenuModel // contains filtered or unexported fields }
func (*SettingsMenu) Draw ¶
func (m *SettingsMenu) Draw(screen *ebiten.Image)
func (*SettingsMenu) Update ¶
func (m *SettingsMenu) Update()
type SplashScene ¶ added in v0.0.3
type SplashScene struct { Game *Game // contains filtered or unexported fields }
func NewSplashScene ¶ added in v0.0.3
func NewSplashScene(g *Game) *SplashScene
func (*SplashScene) Draw ¶ added in v0.0.3
func (s *SplashScene) Draw(screen *ebiten.Image)
func (*SplashScene) Update ¶ added in v0.0.3
func (s *SplashScene) Update() error
type SplashScreen ¶
type SplashScreen struct {
// contains filtered or unexported fields
}
func NewSplashScreen ¶ added in v0.0.1
func NewSplashScreen(g *Game) *SplashScreen
type SpriteHandler ¶
type SpriteHandler struct {
// contains filtered or unexported fields
}
func NewSpriteHandler ¶
func NewSpriteHandler() *SpriteHandler
type SpriteType ¶
type SpriteType int
const ( MapSpriteType SpriteType = iota MechSpriteType VehicleSpriteType VTOLSpriteType InfantrySpriteType EmplacementSpriteType ProjectileSpriteType EffectSpriteType TotalSpriteTypes )
type StrideDirection ¶
type StrideDirection uint
const ( StrideUp StrideDirection = iota StrideDown )
type TargetCycleType ¶
type TargetCycleType int
const ( TARGET_NEXT TargetCycleType = iota TARGET_PREVIOUS TARGET_NEAREST )
type TextureHandler ¶
type TextureHandler struct {
// contains filtered or unexported fields
}
func NewTextureHandler ¶
func NewTextureHandler(mapObj *model.Map) *TextureHandler
func (*TextureHandler) FloorTextureAt ¶
func (t *TextureHandler) FloorTextureAt(x, y int) *image.RGBA
func (*TextureHandler) TextureAt ¶
func (t *TextureHandler) TextureAt(x, y, levelNum, side int) *ebiten.Image
type UnitCardStyle ¶
type UnitCardStyle int
const ( UnitCardSelect UnitCardStyle = iota UnitCardLaunch UnitCardGame UnitCardDebrief )
type VisitObjective ¶ added in v0.0.1
type VisitObjective struct { *BasicObjective // contains filtered or unexported fields }
func (*VisitObjective) Text ¶ added in v0.0.1
func (o *VisitObjective) Text() string
func (*VisitObjective) Update ¶ added in v0.0.1
func (o *VisitObjective) Update(g *Game)
Source Files
¶
- ai.go
- ai_combat.go
- ai_initiative.go
- ai_movement.go
- audio.go
- camera.go
- clutter.go
- collision.go
- combat.go
- config.go
- content.go
- effects.go
- game.go
- hud.go
- input.go
- logging.go
- menu.go
- menu_debrief.go
- menu_elements.go
- menu_game.go
- menu_launch.go
- menu_main.go
- menu_mission.go
- menu_resources.go
- menu_settings.go
- menu_settings_pages.go
- menu_unit.go
- objectives.go
- player.go
- scene.go
- scene_game.go
- scene_instant_action.go
- scene_intro.go
- scene_menu.go
- scene_mission_debrief.go
- scene_splash.go
- sprites.go
- texture.go
- update_sprites.go
- update_units.go