Documentation ¶
Index ¶
- type EncounterType
- type ExtraBonus
- type ExtraEncounter
- type ExtraMagicNode
- type ExtraRoad
- type ExtraTile
- type FullTile
- type MagicNode
- type Map
- func (mapObject *Map) CreateEncounter(x int, y int, encounterType EncounterType, difficulty data.DifficultySetting, ...) bool
- func (mapObject *Map) CreateEncounterRandom(x int, y int, difficulty data.DifficultySetting, plane data.Plane) bool
- func (mapObject *Map) CreateNode(x int, y int, node MagicNode, plane data.Plane, magicSetting data.MagicSetting, ...) *ExtraMagicNode
- func (mapObject *Map) DrawLayer1(cameraX int, cameraY int, animationCounter uint64, imageCache *util.ImageCache, ...)
- func (mapObject *Map) DrawLayer2(cameraX int, cameraY int, animationCounter uint64, imageCache *util.ImageCache, ...)
- func (mapObject *Map) DrawMinimap(screen *ebiten.Image, cities []MiniMapCity, centerX int, centerY int, ...)
- func (mapObject *Map) GetBonusTile(x int, y int) data.BonusType
- func (mapObject *Map) GetCatchmentArea(x int, y int) map[image.Point]FullTile
- func (mapObject *Map) GetLair(x int, y int) *ExtraEncounter
- func (mapObject *Map) GetMagicNode(x int, y int) *ExtraMagicNode
- func (mapObject *Map) GetMeldedNodes(melder Melder) []*ExtraMagicNode
- func (mapObject *Map) GetTile(tileX int, tileY int) FullTile
- func (mapObject *Map) GetTileImage(tileX int, tileY int, animationCounter uint64) (*ebiten.Image, error)
- func (mapObject *Map) Height() int
- func (mapObject *Map) SetBonus(x int, y int, bonus data.BonusType)
- func (mapObject *Map) TileHeight() int
- func (mapObject *Map) TileWidth() int
- func (mapObject *Map) TilesPerColumn(screenHeight int) int
- func (mapObject *Map) TilesPerRow(screenWidth int) int
- func (mapObject *Map) Width() int
- func (mapObject *Map) WrapX(x int) int
- type Melder
- type MiniMapCity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncounterType ¶
type EncounterType int
const ( // lair, plane tower, ancient temple, fallen temple, ruins, abandoned keep, dungeon EncounterTypeLair EncounterType = iota EncounterTypeCave EncounterTypePlaneTower EncounterTypePlaneTowerOpen EncounterTypeAncientTemple EncounterTypeFallenTemple EncounterTypeRuins EncounterTypeAbandonedKeep EncounterTypeDungeon )
type ExtraBonus ¶
wild game, gold ore, mithril, etc
func (*ExtraBonus) DrawLayer1 ¶
func (bonus *ExtraBonus) DrawLayer1(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
func (*ExtraBonus) DrawLayer2 ¶
func (bonus *ExtraBonus) DrawLayer2(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
type ExtraEncounter ¶
type ExtraEncounter struct { Type EncounterType Units []units.Unit }
lair, plane tower, etc
func (*ExtraEncounter) DrawLayer1 ¶
func (extra *ExtraEncounter) DrawLayer1(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
func (*ExtraEncounter) DrawLayer2 ¶
func (extra *ExtraEncounter) DrawLayer2(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
type ExtraMagicNode ¶
type ExtraMagicNode struct { Kind MagicNode Empty bool Guardians []units.Unit Secondary []units.Unit // list of points that are affected by the node Zone []image.Point // if this node is melded, then this player receives the power MeldingWizard Melder // true if melded by a guardian spirit, otherwise false if melded by a magic spirit GuardianSpiritMeld bool }
func MakeMagicNode ¶
func MakeMagicNode(kind MagicNode, magicSetting data.MagicSetting, difficulty data.DifficultySetting, plane data.Plane) *ExtraMagicNode
func (*ExtraMagicNode) DrawLayer1 ¶
func (node *ExtraMagicNode) DrawLayer1(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
func (*ExtraMagicNode) DrawLayer2 ¶
func (node *ExtraMagicNode) DrawLayer2(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int)
type ExtraTile ¶
type ExtraTile interface { DrawLayer1(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int) DrawLayer2(screen *ebiten.Image, imageCache *util.ImageCache, options *ebiten.DrawImageOptions, counter uint64, tileWidth int, tileHeight int) }
type FullTile ¶
func (*FullTile) HasWildGame ¶
type Map ¶
type Map struct { Map *terrain.Map Plane data.Plane // contains information about map squares that contain extra features on top // such as a road, enchantment, encounter place (plane tower, lair, etc) ExtraMap map[image.Point]ExtraTile Data *terrain.TerrainData TileCache map[int]*ebiten.Image // contains filtered or unexported fields }
func (*Map) CreateEncounter ¶
func (mapObject *Map) CreateEncounter(x int, y int, encounterType EncounterType, difficulty data.DifficultySetting, weakStrength bool, plane data.Plane) bool
func (*Map) CreateEncounterRandom ¶
func (*Map) CreateNode ¶
func (mapObject *Map) CreateNode(x int, y int, node MagicNode, plane data.Plane, magicSetting data.MagicSetting, difficulty data.DifficultySetting) *ExtraMagicNode
func (*Map) DrawLayer1 ¶
func (mapObject *Map) DrawLayer1(cameraX int, cameraY int, animationCounter uint64, imageCache *util.ImageCache, screen *ebiten.Image, geom ebiten.GeoM)
draw base map tiles, in general stuff that should go under cities/units
func (*Map) DrawLayer2 ¶
func (mapObject *Map) DrawLayer2(cameraX int, cameraY int, animationCounter uint64, imageCache *util.ImageCache, screen *ebiten.Image, geom ebiten.GeoM)
give the extra nodes a chance to draw on top of cities/units, but still under the fog
func (*Map) DrawMinimap ¶
func (*Map) GetCatchmentArea ¶
func (*Map) GetMagicNode ¶
func (mapObject *Map) GetMagicNode(x int, y int) *ExtraMagicNode
func (*Map) GetMeldedNodes ¶
func (mapObject *Map) GetMeldedNodes(melder Melder) []*ExtraMagicNode
func (*Map) GetTileImage ¶
func (*Map) TileHeight ¶
func (*Map) TilesPerColumn ¶
func (*Map) TilesPerRow ¶
type Melder ¶
type Melder interface {
GetBanner() data.BannerType
}
type MiniMapCity ¶
type MiniMapCity interface { GetX() int GetY() int GetBanner() data.BannerType }
Click to show internal directories.
Click to hide internal directories.