diff --git a/Applications/RayWalk.app/RayEngine.lua b/Applications/RayWalk.app/RayEngine.lua index 648a1bb4..5da0dbe5 100755 --- a/Applications/RayWalk.app/RayEngine.lua +++ b/Applications/RayWalk.app/RayEngine.lua @@ -8,6 +8,8 @@ local GUI = require("GUI") local event = require("Event") local filesystem = require("Filesystem") +---------------------------------------------------- Управление ----------------------------------------------------------------- + local inputX = 0 local inputY = 0 local inputYaw = 0 @@ -192,6 +194,7 @@ function rayEngine.rotate(angle) rayEngine.player.rotation = constrainAngle(rayEngine.player.rotation + angle) end +----------------- Начинаем поворачиааться ------------------------ function rayEngine.turnRight() inputYaw = 1 --rayEngine.rotate(rayEngine.player.rotationSpeed) @@ -202,19 +205,7 @@ function rayEngine.turnLeft() --rayEngine.rotate(-rayEngine.player.rotationSpeed) end -function rayEngine.stopY() - inputY = 0 -end - -function rayEngine.stopX() - inputX = 0 -end - - -function rayEngine.stopYaw() - inputYaw = 0 -end - +----------------------- Начинаем идти ------------------------- function rayEngine.moveForward() inputY = 1 --rayEngine.move(rayEngine.player.moveSpeed, 0) @@ -235,6 +226,21 @@ function rayEngine.moveRight() --rayEngine.move(0, rayEngine.player.moveSpeed) end +--------------- Стоп -------------------------------------- + + +function rayEngine.stopYaw() + inputYaw = 0 +end + +function rayEngine.stopY() + inputY = 0 +end + +function rayEngine.stopX() + inputX = 0 +end + function rayEngine.jump() if not rayEngine.player.jumpTimer then local function onJumpFinished()