// On handle the your own event determinator
On handle the your own event determinator
// On handle the your own event determinator
func (s *Scene) On(determinant EventDeterminant, ef EventFn, mw ...Middleware) {
	ef = applyMiddleware(ef, append(s.middlewares, mw...)...)
	s.events = append(s.events, func(ctx Context) bool {
		if !determinant(ctx) {
			return false
		}
		ef(ctx)
		return true
	})
}
func ( s * Scene ) On ( determinant EventDeterminant , ef EventFn , mw ... Middleware ) { ef = applyMiddleware ( ef , append ( s . middlewares , mw ... ) ... ) s . events = append ( s . events , func ( ctx Context ) bool { if ! determinant ( ctx ) { return false } ef ( ctx ) return true } ) }
On handle the your own event determinator
On handle the your own event determinator