summaryrefslogtreecommitdiff
path: root/objects/Enemy.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-06 23:07:55 +0800
committerEltrac <hi@guhub.cn>2025-03-06 23:07:55 +0800
commitc8ae29ea136ea159c919c6b7108288806ae296c5 (patch)
tree786c3729cb574fdf4a7e1a76973f57c5fceff2dc /objects/Enemy.lua
parent41fef59b951d8a43d4f4c32b71fe93782f5d607f (diff)
style: remove Chinese comment
Diffstat (limited to 'objects/Enemy.lua')
-rw-r--r--objects/Enemy.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/objects/Enemy.lua b/objects/Enemy.lua
index 429b79a..76371b2 100644
--- a/objects/Enemy.lua
+++ b/objects/Enemy.lua
@@ -75,9 +75,8 @@ end
function Enemy:facing()
local dx = self.x - G.player.x
local dy = self.y - G.player.y
- local angle = math.atan2(dy, dx) -- 计算角度,弧度制
+ local angle = math.atan2(dy, dx)
- -- 判断方向
local dir
if angle >= -math.pi / 4 and angle < math.pi / 4 then
dir = Direction.LEFT