changed
This commit is contained in:
		
							parent
							
								
									a392755844
								
							
						
					
					
						commit
						71d1f6e929
					
				
							
								
								
									
										24
									
								
								main.lua
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								main.lua
									
									
									
									
									
								
							| @ -10,6 +10,12 @@ World:addCollisionClass("Player2") | ||||
| World:addCollisionClass("Bullet2") | ||||
| World:addCollisionClass("Wall") | ||||
| 
 | ||||
| --Fonts used in the game | ||||
| GameFont = love.graphics.newFont("assets/Daydream.ttf", 60) | ||||
| DebugFont = love.graphics.newFont("assets/Daydream.ttf", 12) | ||||
| MenuFont = love.graphics.newFont("assets/Daydream.ttf", 45) | ||||
| Walls = {} | ||||
| 
 | ||||
| function love.run() | ||||
| 	if love.load then | ||||
| 		love.load(love.arg.parseGameArguments(arg), arg) | ||||
| @ -86,10 +92,8 @@ function love.load() | ||||
| 	require("Pause/PauseKeyPressed") | ||||
| 	require("Win/WinKeyPressed") | ||||
| 
 | ||||
| 	--Fonts used in the game | ||||
| 	GameFont = love.graphics.newFont("assets/Daydream.ttf", 60) | ||||
| 	DebugFont = love.graphics.newFont("assets/Daydream.ttf", 12) | ||||
| 	MenuFont = love.graphics.newFont("assets/Daydream.ttf", 45) | ||||
| 	-- Set a random seed | ||||
| 	love.math.setRandomSeed(love.timer.getTime()) | ||||
| 
 | ||||
| 	--Game consts | ||||
| 	HEALTH = 3 | ||||
| @ -99,8 +103,6 @@ function love.load() | ||||
| 	Bullets1 = {} | ||||
| 	Bullets2 = {} | ||||
| 
 | ||||
| 	Walls = {} | ||||
| 
 | ||||
| 	DebugFlag = false | ||||
| 	EnableKeyPress1 = true | ||||
| 	KeyPressTime1 = 0 | ||||
| @ -127,7 +129,7 @@ function love.load() | ||||
| 	}) | ||||
| 
 | ||||
| 	--STI Map loading | ||||
| 	LoadMap(1) | ||||
| 	LoadMap(_G.CUR_LEVEL) | ||||
| end | ||||
| 
 | ||||
| function love.keypressed(key) | ||||
| @ -158,8 +160,8 @@ function love.update(dt) | ||||
| 		UpdatePause(dt) | ||||
| 		-- Handle music | ||||
| 		if not musicPause:isPlaying() then | ||||
| 			--musicBattle:setVolume(0) | ||||
| 			--musicPause:setVolume(0.5) | ||||
| 			musicBattle:setVolume(0) | ||||
| 			musicPause:setVolume(0.5) | ||||
| 			love.audio.play(musicBattle) | ||||
| 			love.audio.play(musicPause) | ||||
| 		end | ||||
| @ -168,8 +170,8 @@ function love.update(dt) | ||||
| 		UpdateGame(dt) | ||||
| 		-- Handle music | ||||
| 		if not musicBattle:isPlaying() then | ||||
| 			--musicBattle:setVolume(0.5) | ||||
| 			--musicPause:setVolume(0) | ||||
| 			musicBattle:setVolume(0.5) | ||||
| 			musicPause:setVolume(0) | ||||
| 			love.audio.play(musicBattle) | ||||
| 			love.audio.play(musicPause) | ||||
| 		end | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user