remove demo game
This commit is contained in:
37
dialog.def.go
Normal file
37
dialog.def.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package pncdsl
|
||||
|
||||
type Dialogue struct {
|
||||
Name string
|
||||
Start string
|
||||
Nodes []DialogueNode
|
||||
}
|
||||
|
||||
func (d Dialogue) GetName() string { return d.Name }
|
||||
func (d Dialogue) TypeLabel() string { return "dialogue" }
|
||||
|
||||
func (d Dialogue) Node(name string) (DialogueNode, bool) {
|
||||
for _, n := range d.Nodes {
|
||||
if n.Name == name {
|
||||
return n, true
|
||||
}
|
||||
}
|
||||
return DialogueNode{}, false
|
||||
}
|
||||
|
||||
type DialogueNode struct {
|
||||
Name string
|
||||
Lines []DialogueLine
|
||||
Choices []DialogueChoice
|
||||
}
|
||||
|
||||
type DialogueLine struct {
|
||||
Speaker string
|
||||
Text string
|
||||
}
|
||||
|
||||
type DialogueChoice struct {
|
||||
Text string
|
||||
Show Condition // nil = always
|
||||
Once bool
|
||||
Actions []Action
|
||||
}
|
||||
Reference in New Issue
Block a user