manager

package
v0.0.0-...-c0736c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstructionSet

type InstructionSet struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

InstructionSet 指令集

func NewInstructionSet

func NewInstructionSet() *InstructionSet

NewInstructionSet ...

func (*InstructionSet) Add

func (s *InstructionSet) Add(instr instr.Instruction)

Add 添加指令

func (*InstructionSet) Assign

func (s *InstructionSet) Assign(instructions map[string]instr.Instruction)

Assign 批量添加指令(覆盖合并)

func (*InstructionSet) ExecAll

func (s *InstructionSet) ExecAll(state *state.MissionState)

ExecAll 执行所有指令

func (*InstructionSet) Items

func (s *InstructionSet) Items() map[string]instr.Instruction

Items 获取指令集

func (*InstructionSet) Remove

func (s *InstructionSet) Remove(uid string)

Remove 删除指令

func (*InstructionSet) RemoveExecuted

func (s *InstructionSet) RemoveExecuted()

RemoveExecuted 删除已执行的指令

type MissionManager

type MissionManager struct {
	// contains filtered or unexported fields
}

MissionManager 任务管理器

func New

func New(mission string) *MissionManager

NewManager ...

func (*MissionManager) Draw

func (m *MissionManager) Draw(screen *ebiten.Image)

Draw 绘制任务图像

func (*MissionManager) Update

func (m *MissionManager) Update() (state.MissionStatus, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL