engine

package
v0.0.0-...-1c33fca Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InventoryName = ".inventory"
)
View Source
var PkgLogger logger

Functions

This section is empty.

Types

type Engine

type Engine struct {
	*assets.Level
	*Player
}

func NewEngine

func NewEngine(r *assets.Resources) *Engine

func (*Engine) Access

func (e *Engine) Access(node fs.Node) error

func (*Engine) Actions

func (e *Engine) Actions(t game.ActionType, name string, node fs.Node) fs.Node

func (*Engine) Entities

func (e *Engine) Entities(node fs.Node) ([]fuse.Dirent, error)

type Inventory

type Inventory struct {
	*core.Directory
}

func NewInventory

func NewInventory(parent fs.Node, items ...Item) *Inventory

func (*Inventory) Add

func (inv *Inventory) Add(items ...Item)

func (*Inventory) Register

func (inv *Inventory) Register(node fs.Node)

func (*Inventory) Remove

func (inv *Inventory) Remove(name string)

func (*Inventory) Unregister

func (inv *Inventory) Unregister(node fs.Node)

type Item

type Item struct {
	Name    string
	Content []byte
}

type Player

type Player struct {
	*Inventory
}

func NewPlayer

func NewPlayer() *Player

Jump to

Keyboard shortcuts

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