Documentation ¶
Index ¶
- func ComputeScore(ctx context.Context, rec *arcade.Recording) (int64, error)
- type Cloud
- type DungeonFloor
- func (d *DungeonFloor) CreateEntities(ctx context.Context) error
- func (d *DungeonFloor) DestroyItem(x, z float64)
- func (d *DungeonFloor) DirToPlayer(observer *Entity) arcade.Button
- func (d *DungeonFloor) DoDamage(ctx context.Context, entity *Entity) error
- func (d *DungeonFloor) EntityInPos(x, z float64) *Entity
- func (d *DungeonFloor) Generate(ctx context.Context, mk *MiteKnight) error
- func (d *DungeonFloor) GetRandomEnemy(ctx context.Context) (EntityType, error)
- func (d *DungeonFloor) GetRandomPointInRoom(ctx context.Context, roomID int, skipFencepostEmulation bool) (float64, float64, error)
- func (d *DungeonFloor) HideUnseen(ctx context.Context) error
- func (d *DungeonFloor) IsFrontFree(x, z float64, dir arcade.Button) bool
- func (d *DungeonFloor) MoveForward(ctx context.Context, entity *Entity, dir arcade.Button) func(yield func()) error
- func (d *DungeonFloor) NewEnemy(ctx context.Context, enemyType EntityType, pos *[2]float64) (*Entity, error)
- func (d *DungeonFloor) SetCorridors(ctx context.Context) error
- func (d *DungeonFloor) SetExtras(ctx context.Context) error
- func (d *DungeonFloor) TileIsInRoomID(x, y float64) int
- type Entity
- type EntityType
- type FlowerJourney
- func (fj *FlowerJourney) CheckCollision(x, y, w, h float64) bool
- func (fj *FlowerJourney) Dead(isEnemy bool)
- func (fj *FlowerJourney) Done() bool
- func (fj *FlowerJourney) Generate(ctx context.Context) error
- func (fj *FlowerJourney) InitGame(ctx context.Context) error
- func (fj *FlowerJourney) InitRules(ctx context.Context, rec *arcade.Recording) error
- func (fj *FlowerJourney) Logic(ctx context.Context) error
- func (fj *FlowerJourney) StartGame(ctx context.Context) error
- func (fj *FlowerJourney) Update(ctx context.Context) error
- func (fj *FlowerJourney) UseItem()
- type GameState
- type ItemType
- type MiteKnight
- func (mk *MiteKnight) Clock(ctx context.Context) (bool, error)
- func (mk *MiteKnight) Done() bool
- func (mk *MiteKnight) EnemyAI(ctx context.Context, floor *DungeonFloor) error
- func (mk *MiteKnight) FloorChange(yield func()) error
- func (mk *MiteKnight) Generate(ctx context.Context) error
- func (mk *MiteKnight) GetInput(ctx context.Context, floor *DungeonFloor) error
- func (mk *MiteKnight) InitGame(ctx context.Context) error
- func (mk *MiteKnight) InitRules(ctx context.Context, rec *arcade.Recording) error
- func (mk *MiteKnight) Logic(ctx context.Context) error
- func (mk *MiteKnight) StartGame(ctx context.Context) error
- type Processor
- type Rect2
- type State
- func (s *State) ConsumeButton(btn arcade.Button) bool
- func (s *State) ConsumeButtonAllowRepeat(btn arcade.Button, delay float64) bool
- func (s *State) InitInputs(ctx context.Context, rec *arcade.Recording) error
- func (s *State) InitRand(ctx context.Context, rec *arcade.Recording) error
- func (s *State) Rand(ctx context.Context, min, max float64) (float64, error)
- func (s *State) RandCheapf(ctx context.Context) (float64, error)
- func (s *State) Randf(ctx context.Context) (float64, error)
- func (s *State) RunCoroutines(ctx context.Context) error
- func (s *State) StartCoroutine(ctx context.Context, f func(yield func()) error) error
- func (s *State) UpdateInputs(ctx context.Context) error
- type TileType
- type Wall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DungeonFloor ¶
type DungeonFloor struct { Floor float64 SizeX float64 SizeY float64 RoomData []*Rect2 Enemies []*Entity Player *Entity Boss *Entity Door *Entity Items []*Entity FloorMap [][]TileType HasKey bool GotKey bool SpawnedEnemyAt map[[2]int]bool Dungeon *MiteKnight }
func (*DungeonFloor) CreateEntities ¶
func (d *DungeonFloor) CreateEntities(ctx context.Context) error
func (*DungeonFloor) DestroyItem ¶
func (d *DungeonFloor) DestroyItem(x, z float64)
func (*DungeonFloor) DirToPlayer ¶
func (d *DungeonFloor) DirToPlayer(observer *Entity) arcade.Button
func (*DungeonFloor) DoDamage ¶
func (d *DungeonFloor) DoDamage(ctx context.Context, entity *Entity) error
func (*DungeonFloor) EntityInPos ¶
func (d *DungeonFloor) EntityInPos(x, z float64) *Entity
func (*DungeonFloor) Generate ¶
func (d *DungeonFloor) Generate(ctx context.Context, mk *MiteKnight) error
func (*DungeonFloor) GetRandomEnemy ¶
func (d *DungeonFloor) GetRandomEnemy(ctx context.Context) (EntityType, error)
func (*DungeonFloor) GetRandomPointInRoom ¶
func (*DungeonFloor) HideUnseen ¶
func (d *DungeonFloor) HideUnseen(ctx context.Context) error
func (*DungeonFloor) IsFrontFree ¶
func (d *DungeonFloor) IsFrontFree(x, z float64, dir arcade.Button) bool
func (*DungeonFloor) MoveForward ¶
func (*DungeonFloor) NewEnemy ¶
func (d *DungeonFloor) NewEnemy(ctx context.Context, enemyType EntityType, pos *[2]float64) (*Entity, error)
func (*DungeonFloor) SetCorridors ¶
func (d *DungeonFloor) SetCorridors(ctx context.Context) error
func (*DungeonFloor) TileIsInRoomID ¶
func (d *DungeonFloor) TileIsInRoomID(x, y float64) int
type EntityType ¶
type EntityType int
const ( EntityAnt EntityType = iota EntityWizard EntityFireball EntityRandomEnemy EntityPotion EntityKey EntityDoor )
type FlowerJourney ¶
type FlowerJourney struct { State *State Rules arcade.FlowerJourneyRules GameState GameState Countdown float64 Combo float64 Invul float64 InputCooldown float64 Speed float64 Progress float64 PlayerX float64 PlayerY float64 PlayerVelocity float64 ItemX float64 ItemY float64 ItemEnabled bool EnemyEnabled bool PassedEnemy bool PassedHive bool ItemType ItemType ItemProgress float64 EnemyX float64 EnemyY float64 WallID int CloudID int Walls []*Wall Clouds []*Cloud PausedFor uint64 PausedAt uint64 }
func (*FlowerJourney) CheckCollision ¶
func (fj *FlowerJourney) CheckCollision(x, y, w, h float64) bool
func (*FlowerJourney) Dead ¶
func (fj *FlowerJourney) Dead(isEnemy bool)
func (*FlowerJourney) Done ¶
func (fj *FlowerJourney) Done() bool
func (*FlowerJourney) UseItem ¶
func (fj *FlowerJourney) UseItem()
type MiteKnight ¶
type MiteKnight struct { State *State Rules arcade.MiteKnightRules TimeMin float64 TimeSec float64 Floor int Floors []*DungeonFloor PauseAt uint64 InputDelay float64 CanInput bool Pause bool Moving bool StopClock bool Winner bool }
func (*MiteKnight) Done ¶
func (mk *MiteKnight) Done() bool
func (*MiteKnight) EnemyAI ¶
func (mk *MiteKnight) EnemyAI(ctx context.Context, floor *DungeonFloor) error
func (*MiteKnight) FloorChange ¶
func (mk *MiteKnight) FloorChange(yield func()) error
func (*MiteKnight) GetInput ¶
func (mk *MiteKnight) GetInput(ctx context.Context, floor *DungeonFloor) error
type State ¶
type State struct { TickCount uint64 Score float64 Version [3]uint64 Inputs [][]arcade.Button ButtonHeld [10]bool ButtonPressed [10]bool ButtonWasPressed [10]uint64 Coroutines []chan<- chan<- coroutineTick FinalRandCount uint64 RNG *rng.RNG }
func (*State) ConsumeButtonAllowRepeat ¶
func (*State) InitInputs ¶
func (*State) StartCoroutine ¶
Click to show internal directories.
Click to hide internal directories.