From 7a48e0303241ff30572028d3c8cc303c09b04fa3 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 13 Mar 2025 10:37:23 +0800 Subject: chore: remove unused method --- objects/Player.lua | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'objects/Player.lua') diff --git a/objects/Player.lua b/objects/Player.lua index 51de42d..44f2e5d 100644 --- a/objects/Player.lua +++ b/objects/Player.lua @@ -117,30 +117,6 @@ function Player:update(dt) end self.frameTimer:update(dt) - - -- player enters door - -- for _, door in pairs(G.currentRoom.doors) do - -- local entersDoor = door.body:collide(self.body, door.x, door.y, self.x, self.y) and - -- G.currentRoom.isCleared - -- if door ~= false and entersDoor then - -- map.switchRoom(door.to) - - -- -- update player position after entering a new room - -- local doorH, doorW, playerR = door.body.h, door.body.w, self.body.r - -- local roomX, roomY, roomW, roomH = G.currentRoom:getX(), G.currentRoom:getY(), G.currentRoom:getWidth(), G.currentRoom:getHeight() - -- if door.location == Direction.LEFT then - -- self:setX(roomX + roomW - playerR - doorW) - -- elseif door.location == Direction.RIGHT then - -- self:setX(roomX + playerR + doorW) - -- elseif door.location == Direction.TOP then - -- self:setY(roomY + roomH - playerR - doorH) - -- elseif door.location == Direction.BOTTOM then - -- self:setY(roomY + playerR + doorH) - -- end - - -- break - -- end - -- end end return Player -- cgit v1.2.3