api

package
v0.0.0-...-9034458 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFrame

type EventFrame interface {
	// FUTURE:
	// i just switched to an interface for watching, but i think thats wrong. what game really needs is a way to send events to targets: look at LookupParents whichi is likewise part of this.
	// if the event queue was given to the game as an object perhaps,
	// if it exposed an algorithm.....
	// the other interesting aspect this is how this is attached to LookupCallbacks, since that is how the code calls out.
	//
	//related: *maybe* Target should be mapped into prototype
	// Class should be removed from E.Target;
	// only: how do we know that a thing is a "class" and should get "Class" resource? i had an answer to this one.....
	// could potentially send target type to startframe
	// right now it seems wrong that the game decides that.
	BeginEvent(meta.Instance, meta.Instance, E.PathList, *E.Message) IEndEvent

	// hacking... there are actions which arent events --
	// this gets the command output to stop consolidating lines across these actions
	FlushFrame()
}

type IEndEvent

type IEndEvent interface {
	EndEvent()
}

type Log

type Log interface {
	Println(v ...interface{})
	Printf(format string, v ...interface{})
}

type LookupCallbacks

type LookupCallbacks interface {
	// LookupCallback returns nil if not found.
	LookupCallback(ident.Id) (G.Callback, bool)
}

type LookupParents

type LookupParents interface {
	// parent instance, property used to find the parent, true if existed
	LookupParent(meta.Instance) (meta.Instance, meta.Property, bool)
}

type Output

type Output interface {
	// ScriptSays some standard output.
	ScriptSays(lines []string)
	// ActorSays that the actor or object with the passed name has something to say.
	ActorSays(whose meta.Instance, lines []string)
	// Log debugging output.
	Log(string)
}

Output required to display text. FIX: this should be removed ScriptSays and ActorSays should be events the console client should use game events to output to a standard string stream TBD: evaluate for best practices multiple events ( log, script, actor ) vs. one event and type info TBD: logging. less context passing, more java style: private final static Logger Log = LoggerFactory.getLogger(Class); how to accomplish that well in go? just use log?

type SaveLoad

type SaveLoad interface {
	SaveGame(autosave bool) (string, error)
}

Jump to

Keyboard shortcuts

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