Пример #1
0
func (s *GameState) CreatePlayer() {
	wo := wobject.NewWObject("player", 2, 1)
	//	wo.Modules[0] = wobject.NewSimpleMoveWModule()
	wo.Modules[0] = NewCharacterControlerWModule()
	wo.Modules[1] = wobject.NewSimpleCollisionWModule()

	s.Player = wo
	s.ObjectManager.RegisterObject(s.Player, v.Vector3f{0, 10, 0}, nil)
}
Пример #2
0
func CreateBall(pos v.Vector3f) *wobject.WObject {
	wo := wobject.NewWObject("ball", 1, 1)
	wo.Modules[0] = NewPhysicsSphereWModule()

	return wo
}