Versions in this module Expand all Collapse all v1 v1.1.1 Jul 19, 2022 v1.1.0 Jan 30, 2022 Changes in this version + func HandleRCIWindow(x, y int) bool + func PlayNextSong() + func ResumeSong() v1.0.0 Jan 23, 2022 Changes in this version + const MonthTicks + const SidebarWidth + const StructureBulldozer + const StructureCommercialHigh + const StructureCommercialLow + const StructureCommercialMedium + const StructureCommercialZone + const StructureIndustrialHigh + const StructureIndustrialLow + const StructureIndustrialMedium + const StructureIndustrialZone + const StructurePoliceStation + const StructurePowerPlantCoal + const StructurePowerPlantNuclear + const StructurePowerPlantSolar + const StructureResidentialHigh + const StructureResidentialLow + const StructureResidentialMedium + const StructureResidentialZone + const StructureRoad + const StructureToggleHelp + const StructureToggleTransparentStructures + const TileSize + const YearTicks + var CameraMaxZoom = 1.0 + var CameraMinZoom = 0.1 + var DirtTile = uint32(9*32 + (0)) + var ErrNothingToBulldoze = errors.New("nothing to bulldoze") + var GrassTile = uint32(11*32 + (0)) + var HUDButtons []*HUDButton + var HelpText = []string + var PowerPlantCapacities = map[int]int + var StructureCosts = map[int]int + var StructureFilePaths = map[int]string + var StructureTooltips = map[int]string + var TreeTileA = uint32(5*32 + (24)) + var TreeTileB = uint32(5*32 + (25)) + var World = &GameWorld + var ZonePowerRequirement = map[int]int + func AltButtonAt(x, y int) int + func CartesianToIso(x, y float64) (float64, float64) + func Date() (month string, year string) + func Demand() (r, c, i float64) + func DrawMap(structureType int) *ebiten.Image + func HandleRCIWindowClick(x, y int) + func HelpButtonAt(x, y int) int + func IsPowerPlant(structureType int) bool + func IsZone(structureType int) bool + func IsoToCartesian(x, y float64) (float64, float64) + func IsoToScreen(x, y float64) (float64, float64) + func LevelCoordinatesToScreen(x, y float64) (float64, float64) + func LoadMap(structureType int) (*tiled.Map, error) + func LoadTileset() error + func ObjectToRect(o *tiled.Object) image.Rectangle + func Population() (r, c, i int) + func Reset() + func ResetPowerOuts() + func Satisfaction() (r, c, i float64) + func ScreenToCartesian(x, y int) (float64, float64) + func ScreenToIso(x, y int) (float64, float64) + func SetHelpPage(page int) + func SetHoverStructure(structureType int) + func ShowBuildCost(structureType int, cost int) + func ShowMessage(message string, duration int) + func StartGame() + func TargetPopulation() (r, c, i int) + func TickMessages() + func Tooltip() string + func ValidXY(x, y int) bool + type GameLevel struct + Tiles [][][]*Tile + func NewLevel(size int) *GameLevel + func (l *GameLevel) AddLayer() + func (l *GameLevel) ClearHoverSprites() + type GameWorld struct + BrokenPieceA gohan.Entity + BrokenPieceB gohan.Entity + BuildDragX int + BuildDragY int + CamMoving bool + CamScale float64 + CamScaleTarget float64 + CamX float64 + CamY float64 + CreepEntities []gohan.Entity + CreepRects []image.Rectangle + Debug int + DisableEsc bool + EnvironmentSprites int + Funds int + GameOver bool + GameStarted bool + GameStartedTicks int + GotCursorPosition bool + HUDButtonRects []image.Rectangle + HUDUpdated bool + HavePowerOut bool + HazardRects []image.Rectangle + HelpButtonRects []image.Rectangle + HelpPage int + HelpUpdated bool + HoverLastX int + HoverLastY int + HoverStructure int + HoverValid bool + HoverX int + HoverY int + LastBuildX int + LastBuildY int + Level *GameLevel + Map *tiled.Map + Messages []string + MessagesTicks []int + MuteMusic bool + MuteSoundEffects bool + NativeResolution bool + NoClip bool + ObjectGroups []*tiled.ObjectGroup + Paused bool + Player gohan.Entity + PlayerHeight float64 + PlayerWidth float64 + PlayerX float64 + PlayerY float64 + Power PowerMap + PowerAvailable int + PowerNeeded int + PowerOuts [][]bool + PowerPlants []*PowerPlant + PowerUpdated bool + Printer *message.Printer + RCIButtonRect image.Rectangle + RCIWindowRect image.Rectangle + ResetGame bool + ScreenH int + ScreenW int + SelectedStructure *Structure + ShowRCIWindow bool + TaxC float64 + TaxI float64 + TaxR float64 + Ticks int + TileImages map[uint32]*ebiten.Image + TileImagesFirstGID uint32 + TransparentStructures bool + TriggerEntities []gohan.Entity + TriggerNames []string + TriggerRects []image.Rectangle + Zones []*Zone + func (w *GameWorld) SetGameOver(vx, vy float64) + type HUDButton struct + Label string + Sprite *ebiten.Image + SpriteOffsetX float64 + SpriteOffsetY float64 + StructureType int + func HUDButtonAt(x, y int) *HUDButton + type PowerMap [][]*PowerMapTile + func (m PowerMap) GetTile(x, y int) *PowerMapTile + func (m PowerMap) SetTile(x, y int, carriesPower bool) + type PowerMapTile struct + CarriesPower bool + X int + Y int + func (t *PowerMapTile) Down() *PowerMapTile + func (t *PowerMapTile) Left() *PowerMapTile + func (t *PowerMapTile) PathEstimatedCost(to astar.Pather) float64 + func (t *PowerMapTile) PathNeighborCost(to astar.Pather) float64 + func (t *PowerMapTile) PathNeighbors() []astar.Pather + func (t *PowerMapTile) Right() *PowerMapTile + func (t *PowerMapTile) Up() *PowerMapTile + type PowerPlant struct + Type int + X int + Y int + type Structure struct + Children []gohan.Entity + Entity gohan.Entity + Type int + X int + Y int + func BuildStructure(structureType int, hover bool, placeX int, placeY int) (*Structure, error) + type Tile struct + EnvironmentSprite *ebiten.Image + HoverSprite *ebiten.Image + Sprite *ebiten.Image + type Zone struct + Population int + Powered bool + Type int + X int + Y int