Documentation
¶
Index ¶
- type AINode
- type BaseNode
- type OnExecTreeFunc
- type OnTreeChildFinishFunc
- type Result
- type SelectAINode
- func (s *SelectAINode) AddNodes(nodes ...BaseNode)
- func (s *SelectAINode) OnEnter() Result
- func (s *SelectAINode) OnExit()
- func (s *SelectAINode) OnInstall()
- func (s *SelectAINode) OnUninstall()
- func (s *SelectAINode) Print()
- func (s *SelectAINode) SetIdx(idx int)
- func (s *SelectAINode) SetParent(parent BaseNode)
- func (s *SelectAINode) WhoAmI() (am string)
- type SequenceAINode
- func (s *SequenceAINode) AddNodes(nodes ...BaseNode)
- func (s *SequenceAINode) OnEnter() Result
- func (s *SequenceAINode) OnExit()
- func (s *SequenceAINode) OnInstall()
- func (s *SequenceAINode) OnUninstall()
- func (s *SequenceAINode) Print()
- func (s *SequenceAINode) SetIdx(idx int)
- func (s *SequenceAINode) SetParent(parent BaseNode)
- func (s *SequenceAINode) WhoAmI() (am string)
- type Tree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AINode ¶
type AINode struct {
ChildCount int
Parent BaseNode
IdxInParent int
Name string
Tree *Tree
// contains filtered or unexported fields
}
AINode node describe
type BaseNode ¶
type BaseNode interface {
SetParent(parent BaseNode)
SetIdx(idx int)
GetIdx() int
Print()
WhoAmI() string
SetTree(t *Tree)
OnInstall()
OnUninstall()
OnEnter() Result
OnExit()
}
BaseNode baseNode
type OnExecTreeFunc ¶
type OnExecTreeFunc func(tree *Tree)
type OnTreeChildFinishFunc ¶
type SelectAINode ¶
type SelectAINode struct {
AINode
}
SequenceAINode sequence node
func (*SelectAINode) SetParent ¶
func (s *SelectAINode) SetParent(parent BaseNode)
SetParent set parent
type SequenceAINode ¶
type SequenceAINode struct {
AINode
}
SequenceAINode sequence node
func (*SequenceAINode) AddNodes ¶
func (s *SequenceAINode) AddNodes(nodes ...BaseNode)
AddNode add node
func (*SequenceAINode) SetParent ¶
func (s *SequenceAINode) SetParent(parent BaseNode)
SetParent set parent
func (*SequenceAINode) WhoAmI ¶
func (s *SequenceAINode) WhoAmI() (am string)
WhoAmI return ownerself
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree tree describe
func NewTree ¶
func NewTree(onExec OnExecTreeFunc, onChildFinish OnTreeChildFinishFunc) *Tree
NewTree new tree
Click to show internal directories.
Click to hide internal directories.