From 2e224e6cafe4825d7e25227a69747bd560ce0268 Mon Sep 17 00:00:00 2001 From: "jiannan.guo@yingxiong.com" Date: Fri, 25 Jul 2025 22:06:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Logic/System/Ball/ShootBall/RecvBallSystem.cs | 5 +++-- .../Logic/System/Ball/ShootBall/ThrowBallSystem.cs | 11 ----------- .../CoreGame/AFramSync/Render/View/DirCtrlInput.cs | 2 +- .../CoreGame/AFramSync/Shared/CoreGameConfig.cs | 3 ++- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/RecvBallSystem.cs b/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/RecvBallSystem.cs index 29a09216..442e29a2 100644 --- a/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/RecvBallSystem.cs +++ b/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/RecvBallSystem.cs @@ -1,4 +1,5 @@ -using Entitas; +using CoreGame.Shared; +using Entitas; using Sog; using UnityEngine; @@ -33,7 +34,7 @@ namespace CoreGame.Logic continue; } var ballTrans = ball.logicTransform; - if ((heroTrans.position - ballTrans.position).SqrMagnitude < Fixed64._4 + if ((heroTrans.position - ballTrans.position).SqrMagnitude < CoreGameConfig.RecvBallDistSqrt && FixedMath.Dot(ballTrans.forward, heroTrans.position - ballTrans.position) > Fixed64._0) { ball.isDestroyEnt = true; diff --git a/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/ThrowBallSystem.cs b/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/ThrowBallSystem.cs index 97bb9b7a..a651a4c9 100644 --- a/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/ThrowBallSystem.cs +++ b/client/client/Assets/Scripts/CoreGame/AFramSync/Logic/System/Ball/ShootBall/ThrowBallSystem.cs @@ -34,17 +34,6 @@ namespace CoreGame.Logic var ballInfo = bagComp.willShootBalls.Dequeue(); var logicTransform = entity.logicTransform; - // Fixed64Vector2 dir = Fixed64Vector2.up; - // if (logicTransform.position.y < -1) - // { - // dir = Fixed64Vector2.zero - logicTransform.position; - // dir.Normalize(); - // } - // else - // { - // dir = FixedRandom.instance.NextDirection2D(); - // } - // LEntityCreatorSvc.CreateBallEntity(entity, logicTransform.position, bagComp.shootDir, ballInfo); } } diff --git a/client/client/Assets/Scripts/CoreGame/AFramSync/Render/View/DirCtrlInput.cs b/client/client/Assets/Scripts/CoreGame/AFramSync/Render/View/DirCtrlInput.cs index 7a55d9d8..0d3050b0 100644 --- a/client/client/Assets/Scripts/CoreGame/AFramSync/Render/View/DirCtrlInput.cs +++ b/client/client/Assets/Scripts/CoreGame/AFramSync/Render/View/DirCtrlInput.cs @@ -22,7 +22,7 @@ namespace CoreGame.Render var localPlayer = instance.LocalPlayerEntHandle; if (localPlayer) { - var f = 10 + (1 - value) * 160; + var f = 10 + (value) * 160; var moveDirectionCommand = RenderCommandSvc.CreateFrameCommand(); moveDirectionCommand.Degree = (short)f; diff --git a/client/client/Assets/Scripts/CoreGame/AFramSync/Shared/CoreGameConfig.cs b/client/client/Assets/Scripts/CoreGame/AFramSync/Shared/CoreGameConfig.cs index 503ee360..eeeb4060 100644 --- a/client/client/Assets/Scripts/CoreGame/AFramSync/Shared/CoreGameConfig.cs +++ b/client/client/Assets/Scripts/CoreGame/AFramSync/Shared/CoreGameConfig.cs @@ -66,7 +66,8 @@ namespace CoreGame.Shared public static float AttachOutTime = 5f; - public static Fixed64Vector2 ExtendSize = new Fixed64Vector2(Fixed64._0_50 + 5, 10); + public static Fixed64Vector2 ExtendSize = new(Fixed64._0_50 + 5, 10); public static Fixed64 TurnTime = Fixed64._3; + public static Fixed64 RecvBallDistSqrt = Fixed64._1_50; } } \ No newline at end of file