예제 #1
0
func special(key, x, Y int) {
	switch key {
	case glut.KEY_UP:
		model.Ball1.Thrust = true
		model.Ball1.ThrustTime = float64(glut.Get(glut.ELAPSED_TIME))
	case glut.KEY_LEFT:
		model.Ball1.Left = true
		model.Ball1.LeftTime = float64(glut.Get(glut.ELAPSED_TIME))
	case glut.KEY_RIGHT:
		model.Ball1.Right = true
		model.Ball1.RightTime = float64(glut.Get(glut.ELAPSED_TIME))
	}
}
예제 #2
0
func frame() {
	model.ModelFrame(float64(glut.Get(glut.ELAPSED_TIME)))
	CurrentWindow.PostRedisplay()
}