Skip to content

Commit 96d51dc

Browse files
committed
Add ugly second player colors.
1 parent 90b9926 commit 96d51dc

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

assets/graphics/ladybug2.png

9.33 KB
Loading

entities/Player.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ function Player:init(n)
99
self.right = "right"
1010
self.up = "up"
1111
self.down = "down"
12+
self.texture = gTextures['ladybug']
1213
else
1314
self.left = "a"
1415
self.right = "d"
1516
self.up = "w"
1617
self.down = "s"
18+
self.texture = gTextures['ladybug2']
1719
end
1820
self.hitbox = {}
1921

@@ -105,7 +107,7 @@ function Player:draw()
105107

106108
if self.state == "alive" then
107109
--- Draw from center
108-
self.animation:draw(gTextures['ladybug'], self.x + 8, self.y + 8, self.orientation, 1, 1, 8, 8)
110+
self.animation:draw(self.texture, self.x + 8, self.y + 8, self.orientation, 1, 1, 8, 8)
109111
Entity.draw(self)
110112
elseif self.state == "dead" or self.state == "goingtoheaven" then
111113
self.deathAnimation:draw(gTextures['ghost'], self.x, self.y)

main.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ function love.load()
8484
['playfield'] = love.graphics.newImage('assets/graphics/playfield.png'),
8585
['top'] = love.graphics.newImage('assets/graphics/topfield.png'),
8686
['ladybug'] = love.graphics.newImage('assets/graphics/ladybug.png'),
87+
['ladybug2'] = love.graphics.newImage('assets/graphics/ladybug2.png'),
8788
['life'] = love.graphics.newImage('assets/graphics/life.png'),
8889
['turnstile'] = love.graphics.newImage('assets/graphics/turnstile.png'),
8990
['flower'] = love.graphics.newImage('assets/graphics/dot.png'),

0 commit comments

Comments
 (0)