mirror of
				https://github.com/Reuh/ubiquitousse.git
				synced 2025-10-27 17:19:31 +00:00 
			
		
		
		
	Probably works better this way
This commit is contained in:
		
							parent
							
								
									b2d22c75d1
								
							
						
					
					
						commit
						e063f55514
					
				
					 4 changed files with 44 additions and 23 deletions
				
			
		|  | @ -1,5 +1,6 @@ | |||
| -- ubiquitousse.event | ||||
| local uqt = require((...):match("^(.-ubiquitousse)%.")) | ||||
| local m = uqt.module | ||||
| local input = uqt.input | ||||
| local time = uqt.time | ||||
| local scene = uqt.scene | ||||
|  | @ -17,15 +18,15 @@ return { | |||
| 	-- @tparam number dt time since last call, in miliseconds | ||||
| 	-- @impl mixed | ||||
| 	update = function(dt) | ||||
| 		if input then input.update(dt) end | ||||
| 		if time then time.update(dt) end | ||||
| 		if scene then scene.update(dt) end | ||||
| 		if m.input then input.update(dt) end | ||||
| 		if m.time then time.update(dt) end | ||||
| 		if m.scene then scene.update(dt) end | ||||
| 	end, | ||||
| 
 | ||||
| 	--- Called each time the game expect a new frame to be drawn. | ||||
| 	-- The screen is expected to be cleared since last frame. | ||||
| 	-- @impl backend | ||||
| 	draw = function() | ||||
| 		if scene then scene.draw() end | ||||
| 		if m.scene then scene.draw() end | ||||
| 	end | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Reuh
						Reuh