示例#1
0
文件: clock.go 项目: onewland/gomud
func NewClock(universe *mud.Universe) *simple.PhysicalObject {
	clock := simple.NewPhysicalObject(universe)
	clock.SetTimeHandler(updateDescription)
	clock.SetVisible(true)
	clock.SetCarryable(false)
	return clock
}
示例#2
0
文件: ball.go 项目: onewland/gomud
func NewBall(universe *mud.Universe, description string) *simple.PhysicalObject {
	ball := simple.NewPhysicalObject(universe)
	ball.SetDescription(fmt.Sprintf("A %s ball", description))
	ball.SetVisible(true)
	ball.SetCarryable(true)
	ball.SetTextHandles("ball", "red ball")
	return ball
}