40 lines
		
	
	
	
		
			828 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
	
		
			828 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| GameScene = Object.extend(Object)
 | |
| 
 | |
| function GameScene:new()
 | |
| end
 | |
| 
 | |
| function GameScene:init()
 | |
| end
 | |
| 
 | |
| function GameScene:update(dt)
 | |
| 
 | |
| end
 | |
| 
 | |
| function GameScene:draw()
 | |
| 
 | |
| end
 | |
| 
 | |
| function GameScene:drawHud()
 | |
| 
 | |
| 	-- Draw images
 | |
| 	love.graphics.setColor(255,255,255, 1)
 | |
| 	love.graphics.draw( gameHud, 0, 600-66 )
 | |
| 
 | |
| 	love.graphics.setColor(255,255,255, 0.75)
 | |
| 	love.graphics.draw( currentPlayer.image, 14, 550,0,0.5,0.5 )
 | |
| 
 | |
| 	love.graphics.setColor( text.r, text.g, text.b, text.alpha )
 | |
| 	love.graphics.print( currentPlayer.name, 48, 550 )
 | |
| 	love.graphics.print( currentPlayer.shipName, 48, 566 )
 | |
| 
 | |
| end
 | |
| 
 | |
| function GameScene:keypressed(key,unicode)
 | |
| 	if key == "1" then
 | |
| 		currentPlayer = CaptainSteve
 | |
| 	elseif key == "2" then
 | |
| 		currentPlayer = CaptainRobert
 | |
| 	elseif key == "3" then
 | |
| 		currentPlayer = CaptainJohn
 | |
| 	end
 | |
| end
 |