예제 #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
}