Browse Source

Get rid of debug line;

bjorn 10 years ago
parent
commit
b2b4c8bf4a
1 changed files with 5 additions and 3 deletions
  1. 5 3
      pigeon.lua

+ 5 - 3
pigeon.lua

@@ -213,9 +213,11 @@ function Pigeon:draw()
   local x, y = self.body:getPosition()
   local x, y = self.body:getPosition()
   self.animation:draw(x, y + self.shapeSize / 2, {noupdate = ctx.paused})
   self.animation:draw(x, y + self.shapeSize / 2, {noupdate = ctx.paused})
 
 
-  local x1, y1, x2, y2 = self:getGroundRaycastPoints()
-  g.setColor(self.grounded and {0, 255, 0} or {255, 0, 0})
-  g.line(x1, y1, x2, y2)
+  if ctx.debug then
+    local x1, y1, x2, y2 = self:getGroundRaycastPoints()
+    g.setColor(self.grounded and {0, 255, 0} or {255, 0, 0})
+    g.line(x1, y1, x2, y2)
+  end
 
 
   if ctx.debug then
   if ctx.debug then
     g.setColor(255, 255, 255)
     g.setColor(255, 255, 255)