Documentation
¶
Index ¶
- Constants
- Variables
- func LoadAllCharacterAnimations()
- func LoadAssets()
- func LoadCharacterAnimation(spriteSheet *ebiten.Image) map[int]*ebiten_extended.AnimationSet
- func LoadImages()
- func LoadTileMap()
- func LoadTileMaps() map[string]*tiled.Map
- func LoadWaterAnimationSets() *ebiten_extended.AnimationSet
- func NewPlayerIdleTransitions(p *Player) []fsm.Transition
- func NewPlayerMoveTransitions(p *Player) []fsm.Transition
- func NewPlayerStateMachine(player *Player) *fsm.StateMachine
- type AbilityID
- type BattleState
- type Character
- type Entity
- type EntityState
- type Game
- type Monster
- type MonsterData
- type MovementComponent
- func (m *MovementComponent) Block()
- func (m *MovementComponent) ChangeDirection(target_pos math2D.Vector2D)
- func (m *MovementComponent) GetDirection() math2D.Vector2D
- func (m *MovementComponent) GetOrientation() orientation
- func (m *MovementComponent) GetSpeed() int
- func (m *MovementComponent) IsBlocked() bool
- func (m *MovementComponent) SetDirection(direction math2D.Vector2D)
- func (m *MovementComponent) SetOrientation(orientation orientation)
- func (m *MovementComponent) SetSpeed(speed int)
- func (m *MovementComponent) Unblock()
- func (m *MovementComponent) Update()
- type Player
- type PlayerIdleState
- type PlayerMoveState
- type StatID
- type TileLayer
- type TileMap
- type TileMapImporter
- type World
Constants ¶
View Source
const ( ANIM_DOWN = iota ANIM_LEFT ANIM_RIGHT ANIM_UP )
View Source
const ( UP orientation = iota DOWN LEFT RIGHT )
View Source
const ( MOVE_UP inputv3.ActionID = iota MOVE_DOWN MOVE_LEFT MOVE_RIGHT )
View Source
const ( MOVE_STATE fsm.StateID = iota IDLE_STATE )
View Source
const ( SCREEN_WIDTH = 1280 SCREEN_HEIGHT = 720 TILE_SIZE = 64 ANIMATION_SPEED = 6 BATTLE_OUTLINE_WIDTH = 4 )
View Source
const ( WATER_LAYER int = iota BG_LAYER SHADOW_LAYER MAIN_LAYER TOP_LAYER BATTLE_OUTLINE_LAYER BATTLE_NAME_LAYER BATTLE_MONSTER_LAYER BATTLE_EFFECTS_LAYER BATTLE_OVERLAY_LAYER BATTLE_CHOICES_LAYER BATTLE_CHOICES_ICON_LAYER BATTLE_CHOICES_TEXT_LAYER BATTLE_CHOICES_CURSOR_LAYER BATTLE_CHOICES_CURSOR_ICON_LAYER BATTLE_CHOICES_CURSOR_TEXT_LAYER )
View Source
const (
PLAYER_SPEED = 250
)
Variables ¶
View Source
var ( Attacks_explosion string = "explosion" Attacks_fire string = "fire" Attacks_green string = "green" Attacks_ice string = "ice" Attacks_scratch string = "scratch" Attacks_splash string = "splash" Backgrounds_forest string = "forest" Backgrounds_ice string = "ice" Backgrounds_sand string = "sand" Characters_blond string = "blond" Characters_fire_boss string = "fire_boss" Characters_grass_boss string = "grass_boss" Characters_hat_girl string = "hat_girl" Characters_player string = "player" Characters_purple_girl string = "purple_girl" Characters_straw string = "straw" Characters_water_boss string = "water_boss" Characters_young_girl string = "young_girl" Characters_young_guy string = "young_guy" Cmd___debug_bin2272826165 string = "__debug_bin2272826165" Cmd_script string = "script" Fonts_PixeloidSans string = "PixeloidSans" Fonts_dogicapixel string = "dogicapixel" Fonts_dogicapixelbold string = "dogicapixelbold" Icons_Atrox string = "Atrox" Icons_Charmadillo string = "Charmadillo" Icons_Cindrill string = "Cindrill" Icons_Cleaf string = "Cleaf" Icons_Draem string = "Draem" Icons_Finiette string = "Finiette" Icons_Finsta string = "Finsta" Icons_Friolera string = "Friolera" Icons_Gulfin string = "Gulfin" Icons_Ivieron string = "Ivieron" Icons_Jacana string = "Jacana" Icons_Larvea string = "Larvea" Icons_Pluma string = "Pluma" Icons_Plumette string = "Plumette" Icons_Pouch string = "Pouch" Icons_Sparchu string = "Sparchu" Monsters_Atrox string = "Atrox" Monsters_Charmadillo string = "Charmadillo" Monsters_Cindrill string = "Cindrill" Monsters_Cleaf string = "Cleaf" Monsters_Draem string = "Draem" Monsters_Finiette string = "Finiette" Monsters_Finsta string = "Finsta" Monsters_Friolera string = "Friolera" Monsters_Gulfin string = "Gulfin" Monsters_Ivieron string = "Ivieron" Monsters_Jacana string = "Jacana" Monsters_Larvea string = "Larvea" Monsters_Pluma string = "Pluma" Monsters_Plumette string = "Plumette" Monsters_Pouch string = "Pouch" Monsters_Sparchu string = "Sparchu" Objects_arean_fire string = "arean_fire" Objects_arena_plant string = "arena_plant" Objects_arena_water string = "arena_water" Objects_gate_pillar string = "gate_pillar" Objects_gate_top string = "gate_top" Objects_grass string = "grass" Objects_grass_ice string = "grass_ice" Objects_grassrock1 string = "grassrock1" Objects_grassrock2 string = "grassrock2" Objects_green_tree string = "green_tree" Objects_green_tree_bushy string = "green_tree_bushy" Objects_green_tree_small string = "green_tree_small" Objects_hospital string = "hospital" Objects_house_large string = "house_large" Objects_house_large_alt string = "house_large_alt" Objects_house_small string = "house_small" Objects_house_small_alt string = "house_small_alt" Objects_ice_tree string = "ice_tree" Objects_icerock1 string = "icerock1" Objects_icerock2 string = "icerock2" Objects_palm string = "palm" Objects_palm_alt string = "palm_alt" Objects_palm_small string = "palm_small" Objects_ruin_gate string = "ruin_gate" Objects_ruin_pillar string = "ruin_pillar" Objects_ruin_pillar_broke string = "ruin_pillar_broke" Objects_ruin_pillar_broke_alt string = "ruin_pillar_broke_alt" Objects_sand string = "sand" Objects_sandrock1 string = "sandrock1" Objects_sandrock2 string = "sandrock2" Objects_teal_tree string = "teal_tree" Objects_teal_tree_bushy string = "teal_tree_bushy" Objects_teal_tree_small string = "teal_tree_small" Other_shadow string = "shadow" Other_star_animation string = "star_animation" Other_star_animation1 string = "star_animation1" Other_star_animation2 string = "star_animation2" Other_star_animation3 string = "star_animation3" Other_star_animation4 string = "star_animation4" Other_star_animation5 string = "star_animation5" Other_star_animation6 string = "star_animation6" Other_star_animation7 string = "star_animation7" Other_star_animation8 string = "star_animation8" Other_star_animation9 string = "star_animation9" Other_star_animation10 string = "star_animation10" Other_star_animation11 string = "star_animation11" Other_star_animation12 string = "star_animation12" Other_star_animation13 string = "star_animation13" Other_star_animation14 string = "star_animation14" Other_star_animation15 string = "star_animation15" Other_star_animation16 string = "star_animation16" Other_star_animation17 string = "star_animation17" Other_star_animation18 string = "star_animation18" Other_star_animation19 string = "star_animation19" Other_star_animation20 string = "star_animation20" Other_star_animation21 string = "star_animation21" Other_star_animation22 string = "star_animation22" Other_star_animation23 string = "star_animation23" Other_star_animation24 string = "star_animation24" Other_star_animation25 string = "star_animation25" Other_star_animation26 string = "star_animation26" Other_star_animation27 string = "star_animation27" Tilesets_coast string = "coast" Tilesets_indoor string = "indoor" Tilesets_water0 string = "water0" Tilesets_water1 string = "water1" Tilesets_water2 string = "water2" Tilesets_water3 string = "water3" Tilesets_world string = "world" Ui_arrows string = "arrows" Ui_arrows_highlight string = "arrows_highlight" Ui_attack string = "attack" Ui_cross string = "cross" Ui_defense string = "defense" Ui_energy string = "energy" Ui_hand string = "hand" Ui_hand_highlight string = "hand_highlight" Ui_health string = "health" Ui_notice string = "notice" Ui_recovery string = "recovery" Ui_shield string = "shield" Ui_shield_highlight string = "shield_highlight" Ui_speed string = "speed" Ui_star string = "star" Ui_sword string = "sword" Ui_sword_highlight string = "sword_highlight" )
View Source
var ( WHITE_COLOR = color.RGBA{0xf4, 0xfe, 0xfa, 0xff} PURE_WHITE_COLOR = color.RGBA{0xff, 0xff, 0xff, 0xff} DARK_COLOR = color.RGBA{0x2b, 0x29, 0x2c, 0xff} LIGHT_COLOR = color.RGBA{0xc8, 0xc8, 0xc8, 0xff} GRAY_COLOR = color.RGBA{0x3a, 0x37, 0x3b, 0xff} GOLD_COLOR = color.RGBA{0xff, 0xd7, 0x00, 0xff} LIGHT_GRAY_COLOR = color.RGBA{0x4b, 0x48, 0x4d, 0xff} FIRE_COLOR = color.RGBA{0xf8, 0xa0, 0x60, 0xff} WATER_COLOR = color.RGBA{0x50, 0xb0, 0xd8, 0xff} PLANT_COLOR = color.RGBA{0x64, 0xa9, 0x90, 0xff} BLACK_COLOR = color.RGBA{0x00, 0x00, 0x00, 0xff} RED_COLOR = color.RGBA{0xf0, 0x31, 0x31, 0xff} BLUE_COLOR = color.RGBA{0x66, 0xd7, 0xee, 0xff} NORMAL_COLOR = color.RGBA{0xff, 0xff, 0xff, 0xff} DARK_WHITE_COLOR = color.RGBA{0xf0, 0xf0, 0xf0, 0xff} )
COLORS
View Source
var ( BATTLE_LEFT_POSITION map[string]math2D.Vector2D = map[string]math2D.Vector2D{ "top": math2D.NewVector2D(360, 260), "center": math2D.NewVector2D(190, 400), "bottom": math2D.NewVector2D(410, 520), } BATTLE_RIGHT_POSITION map[string]math2D.Vector2D = map[string]math2D.Vector2D{ "top": math2D.NewVector2D(900, 260), "center": math2D.NewVector2D(1110, 390), "bottom": math2D.NewVector2D(900, 550), } )
BATTLE_POSITIONS
Functions ¶
func LoadAllCharacterAnimations ¶
func LoadAllCharacterAnimations()
func LoadAssets ¶
func LoadAssets()
func LoadCharacterAnimation ¶
func LoadCharacterAnimation(spriteSheet *ebiten.Image) map[int]*ebiten_extended.AnimationSet
func LoadImages ¶
func LoadImages()
func LoadTileMap ¶
func LoadTileMap()
func LoadTileMaps ¶
func LoadWaterAnimationSets ¶
func LoadWaterAnimationSets() *ebiten_extended.AnimationSet
func NewPlayerIdleTransitions ¶
func NewPlayerIdleTransitions(p *Player) []fsm.Transition
func NewPlayerMoveTransitions ¶
func NewPlayerMoveTransitions(p *Player) []fsm.Transition
func NewPlayerStateMachine ¶
func NewPlayerStateMachine(player *Player) *fsm.StateMachine
Types ¶
type BattleState ¶
type BattleState struct {
ebiten_extended.Node
// contains filtered or unexported fields
}
func (*BattleState) CreateMonster ¶
func (bs *BattleState) CreateMonster(monster *MonsterData, index int, posIndex int, entity string)
func (*BattleState) Enter ¶
func (bs *BattleState) Enter()
func (*BattleState) Exit ¶
func (bs *BattleState) Exit()
func (*BattleState) Input ¶
func (bs *BattleState) Input()
func (*BattleState) Update ¶
func (bs *BattleState) Update()
type Entity ¶
type Entity struct {
ebiten_extended.Node2D
// contains filtered or unexported fields
}
type EntityState ¶
type EntityState int
const ( Idle EntityState = iota MovingUp MovingDown MovingLeft MovingRight )
type Game ¶
type Game struct {
}
func (*Game) CreateDialog ¶
func (*Game) LoadSprites ¶
func (g *Game) LoadSprites()
type Monster ¶
type Monster struct {
ebiten_extended.Node2D
}
func NewMonster ¶
func NewMonster() *Monster
type MonsterData ¶
type MonsterData struct {
Name string
Level int
Paused bool
Element string
BaseStats map[StatID]int
Health int
Energy int
Initiative int
Abilities map[AbilityID]int
Defending bool
XP int
LevelUp int
Evolution string
}
func (*MonsterData) GetAbilities ¶
func (md *MonsterData) GetAbilities(all bool) []string
func (*MonsterData) GetStat ¶
func (md *MonsterData) GetStat(stat StatID) int
func (*MonsterData) GetStats ¶
func (md *MonsterData) GetStats() map[StatID]int
func (*MonsterData) ReduceEnergy ¶
func (md *MonsterData) ReduceEnergy(attack string)
type MovementComponent ¶
type MovementComponent struct {
ebiten_extended.Node
// contains filtered or unexported fields
}
func NewMovementComponent ¶
func NewMovementComponent(owner *ebiten_extended.Node2D, speed int) *MovementComponent
func (*MovementComponent) Block ¶
func (m *MovementComponent) Block()
func (*MovementComponent) ChangeDirection ¶
func (m *MovementComponent) ChangeDirection(target_pos math2D.Vector2D)
func (*MovementComponent) GetDirection ¶
func (m *MovementComponent) GetDirection() math2D.Vector2D
func (*MovementComponent) GetOrientation ¶
func (m *MovementComponent) GetOrientation() orientation
func (*MovementComponent) GetSpeed ¶
func (m *MovementComponent) GetSpeed() int
func (*MovementComponent) IsBlocked ¶
func (m *MovementComponent) IsBlocked() bool
func (*MovementComponent) SetDirection ¶
func (m *MovementComponent) SetDirection(direction math2D.Vector2D)
func (*MovementComponent) SetOrientation ¶
func (m *MovementComponent) SetOrientation(orientation orientation)
func (*MovementComponent) SetSpeed ¶
func (m *MovementComponent) SetSpeed(speed int)
func (*MovementComponent) Unblock ¶
func (m *MovementComponent) Unblock()
func (*MovementComponent) Update ¶
func (m *MovementComponent) Update()
type Player ¶
type Player struct {
ebiten_extended.Node2D
// contains filtered or unexported fields
}
func (*Player) OnCollision ¶
type PlayerIdleState ¶
type PlayerIdleState struct {
// contains filtered or unexported fields
}
func NewPlayerIdleState ¶
func NewPlayerIdleState(player *Player) *PlayerIdleState
func (*PlayerIdleState) Enter ¶
func (s *PlayerIdleState) Enter()
func (*PlayerIdleState) Exit ¶
func (s *PlayerIdleState) Exit()
func (*PlayerIdleState) Update ¶
func (s *PlayerIdleState) Update()
type PlayerMoveState ¶
type PlayerMoveState struct {
// contains filtered or unexported fields
}
func NewPlayerMoveState ¶
func NewPlayerMoveState(player *Player) *PlayerMoveState
func (*PlayerMoveState) Enter ¶
func (s *PlayerMoveState) Enter()
func (*PlayerMoveState) Exit ¶
func (s *PlayerMoveState) Exit()
func (*PlayerMoveState) Update ¶
func (s *PlayerMoveState) Update()
type TileMap ¶
type TileMap struct {
ebiten_extended.Node2D
Result *image.NRGBA
Width int
Height int
TileWidth int
TileHeight int
// contains filtered or unexported fields
}
func NewTileMap ¶
func (*TileMap) Clear ¶
func (t *TileMap) Clear()
Clear clears the render result to allow for separation of layers. For example, you can render a layer, make a copy of the render, clear the renderer, and repeat for each layer in the Map.
func (*TileMap) GetLayerByName ¶
func (*TileMap) RenderLayer ¶
func (*TileMap) RenderVisibleLayers ¶
type TileMapImporter ¶
type TileMapImporter struct {
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.