yaml

package
v0.0.0-...-602f89e Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse_yaml

func Parse_yaml(content []byte, is_verbose bool) (engine.GameDataI, error)

Types

type GameData

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

func (*GameData) GetActionById

func (g *GameData) GetActionById(id engine.ActionId) *engine.GameActionInfo

func (*GameData) GetNodeByString

func (g *GameData) GetNodeByString(name string) engine.GameNodeI

func (*GameData) Start

func (g *GameData) Start() engine.GameNodeI

type GameStateEntry

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

func (*GameStateEntry) Actions

func (*GameStateEntry) IsGameLost

func (e *GameStateEntry) IsGameLost() bool

func (*GameStateEntry) IsGameOver

func (e *GameStateEntry) IsGameOver() bool

func (*GameStateEntry) Name

func (e *GameStateEntry) Name() string

func (*GameStateEntry) Next

func (*GameStateEntry) Story

func (e *GameStateEntry) Story() engine.StoryContent

type InnerActionInfo

type InnerActionInfo struct {
	engine.GameActionInfo
	// contains filtered or unexported fields
}

type YamlDataSet

type YamlDataSet struct {
	Version    string           `yaml:"version"`
	Start_node string           `yaml:"start_node"`
	Entries    []YamlStateEntry `yaml:"entries"`
}

type YamlGameAction

type YamlGameAction struct {
	Target string `yaml:"target"`
	Name   string `yaml:"name"`
	Story  string `yaml:"story"`
	Secret string `yaml:"secret"`
}

type YamlStateEntry

type YamlStateEntry struct {
	Name    string           `yaml:"name"`
	Story   string           `yaml:"story"`
	Actions []YamlGameAction `yaml:"actions"`
	Is_dead bool             `yaml:"is_dead"`
	Is_end  bool             `yaml:"is_end"`
}

Jump to

Keyboard shortcuts

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