示例#1
0
文件: al.go 项目: beoran/algo
// Waits for secs seconds the next event from the event queue
func (self *EventQueue) WaitForEventTimed(secs float32) (event *Event, ok bool) {
	event = &Event{}
	ok = bool(C.al_wait_for_event_timed(self.handle, event.toC(), C.float(secs)))
	return event, ok
}
示例#2
0
func (e *EventQueue) WaitForEventTimed(secs float32) (bool, *Event) {
	ev := new(Event)
	r := bool(C.al_wait_for_event_timed((*C.ALLEGRO_EVENT_QUEUE)(unsafe.Pointer(e)), (*C.ALLEGRO_EVENT)(unsafe.Pointer(ev)), C.float(secs)))
	return r, ev
}