Compare commits
	
		
			No commits in common. "feed65cf6d568ea261a590a8305adf47cc9de92e" and "97de68e34b4c4b796cc1607591cf1e063cdec14c" have entirely different histories.
		
	
	
		
			feed65cf6d
			...
			97de68e34b
		
	
		
@ -21,14 +21,8 @@ function Particle:new(x,y,particle_data)
 | 
			
		||||
	o.sprite_flip = particle_data.sprite_flip or o.sprite_flip
 | 
			
		||||
 | 
			
		||||
	o.time = particle_data.time or nil
 | 
			
		||||
	if o.time ~= nil then
 | 
			
		||||
		if particle_data.time_unit ~= nil
 | 
			
		||||
		and particle_data.time_unit == "frames" then
 | 
			
		||||
			o.time = o.time
 | 
			
		||||
		else
 | 
			
		||||
			o.time = o.time * game.framerate
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
	if o.time ~= nil then o.time = o.time * game.framerate end
 | 
			
		||||
 | 
			
		||||
	o.timer = 0
 | 
			
		||||
 | 
			
		||||
	o.vel = {
 | 
			
		||||
 | 
			
		||||
@ -251,8 +251,7 @@ function Player:doPhysics()
 | 
			
		||||
				animation_speed = 0,
 | 
			
		||||
				sprite_tint = hex2rgb("#fed100"),
 | 
			
		||||
				sprite_alpha = 0.5,
 | 
			
		||||
				time = 4,
 | 
			
		||||
				time_unit = "frames",
 | 
			
		||||
				time = 0.05,
 | 
			
		||||
				sprite_flip = {
 | 
			
		||||
					x = self.sprite_flip.x,
 | 
			
		||||
					y = self.sprite_flip.y
 | 
			
		||||
@ -327,10 +326,10 @@ function Player:handleAnimation()
 | 
			
		||||
	elseif self.vel.y < 0 then
 | 
			
		||||
		self.body = self.body:change(animation.nancy.jump)
 | 
			
		||||
		self.mask = self.mask:change(self.mask_type.jump)
 | 
			
		||||
	elseif self.vel.x + self.move_x ~= 0 and not self.is_hooked then
 | 
			
		||||
	elseif self.vel.x + self.move_x ~= 0 then
 | 
			
		||||
		self.body = self.body:change(animation.nancy.run)
 | 
			
		||||
		self.mask = self.mask:change(self.mask_type.run)
 | 
			
		||||
	elseif not self.is_hooked then
 | 
			
		||||
	else
 | 
			
		||||
		self.body = self.body:change(animation.nancy.idle)
 | 
			
		||||
		self.mask = self.mask:change(self.mask_type.idle)
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
@ -49,8 +49,8 @@ end
 | 
			
		||||
function moveSpawns(x,y)
 | 
			
		||||
	for _, spawn in pairs(LoadedObjects.Spawns) do
 | 
			
		||||
		if spawn.selected then
 | 
			
		||||
			spawn.args[1] = math.floor((x/game.scale)+Camera.pos.x)
 | 
			
		||||
			spawn.args[2] = math.floor((y/game.scale)+Camera.pos.y)
 | 
			
		||||
			spawn.args[1] = math.floor(x/game.scale)+Camera.pos.x
 | 
			
		||||
			spawn.args[2] = math.floor(y/game.scale)+Camera.pos.y
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
@ -72,9 +72,6 @@ function promptSpawnNew()
 | 
			
		||||
					for i=2, #result+1 do
 | 
			
		||||
						print("arg #"..i-1)
 | 
			
		||||
						args[i-1] = result[i]
 | 
			
		||||
						if i < 4 then
 | 
			
		||||
							args[i-1] = math.floor(args[i-1])
 | 
			
		||||
						end
 | 
			
		||||
					end
 | 
			
		||||
				else
 | 
			
		||||
					args = {0,0}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								code/ui.lua
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								code/ui.lua
									
									
									
									
									
								
							@ -5,19 +5,13 @@ function addElement(self)
 | 
			
		||||
	self.id = #UIElement
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function drawTextBox(text,x,y,style)
 | 
			
		||||
	local style = style or {}
 | 
			
		||||
function drawTextBox(text,x,y,color,background_color)
 | 
			
		||||
	local color = color or {1,1,1,1}
 | 
			
		||||
	local background_color = background_color or {0,0,0,1}
 | 
			
		||||
	local c1, c2, c3, a = love.graphics.getColor()
 | 
			
		||||
	local width = locale_font:getWidth(text)
 | 
			
		||||
	local height = locale_font:getHeight(text)
 | 
			
		||||
 | 
			
		||||
	local color = style.color or {1,1,1,1}
 | 
			
		||||
	local background_color = style.background_color or {0,0,0,1}
 | 
			
		||||
	local margin = style.margin or 5
 | 
			
		||||
	local rotation = style.rotation or 0
 | 
			
		||||
	local sx = style.sx or 1
 | 
			
		||||
	local sy = style.sy or style.sx
 | 
			
		||||
 | 
			
		||||
	local margin = 5
 | 
			
		||||
	local lines = 1
 | 
			
		||||
	for i in text:gmatch("\n") do
 | 
			
		||||
	    lines = lines + 1
 | 
			
		||||
 | 
			
		||||
@ -62,10 +62,8 @@ function Prompt:draw()
 | 
			
		||||
		self.name .. ": " .. self.input,
 | 
			
		||||
		self.pos.x,
 | 
			
		||||
		self.pos.y,
 | 
			
		||||
		{
 | 
			
		||||
			color = self.color,
 | 
			
		||||
			background_color = self.background_color
 | 
			
		||||
		}
 | 
			
		||||
		self.color,
 | 
			
		||||
		self.background_color
 | 
			
		||||
	)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user