From 567ef641b04875b0855eae14546efdaa386d1596 Mon Sep 17 00:00:00 2001 From: keshaohong <740612340@qq.com> Date: Sun, 5 Jul 2026 20:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=8E=A9=E5=AE=B6=E6=94=BB?= =?UTF-8?q?=E5=87=BB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.5D Engine/Scripts/ProjectileShooter.cs | 23 +------------------ .../Assets/2.5D Engine/Scripts/SwordAttack.cs | 6 +---- unity/UserSettings/EditorUserSettings.asset | 8 +++---- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/unity/Assets/2.5D Engine/Scripts/ProjectileShooter.cs b/unity/Assets/2.5D Engine/Scripts/ProjectileShooter.cs index 260cd5e..d1cf468 100644 --- a/unity/Assets/2.5D Engine/Scripts/ProjectileShooter.cs +++ b/unity/Assets/2.5D Engine/Scripts/ProjectileShooter.cs @@ -11,28 +11,7 @@ namespace IndianOceanAssets.Engine2_5D // Called once per frame void Update() { - // Check if attack key is pressed - if (Input.GetKeyDown(attackKeyCode)) // Left-click - { - // Create a ray from the camera to the mouse position - Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); - - // Raycast to ground layer to find target point - if (Physics.Raycast(ray, out RaycastHit hit, 100f, groundLayer)) - { - Vector3 targetPoint = hit.point; - // Instantiate projectile at shooter's position - GameObject projectile = Instantiate(projectilePrefab, transform.position, Quaternion.identity); - // Set projectile's target point - projectile.GetComponent().SetTarget(targetPoint); - - // Flip shooter sprite based on target direction - if (hit.point.x > transform.position.x) - transform.localScale = new Vector3(Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z); - else - transform.localScale = new Vector3(-Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z); - } - } + // 攻击输入已移除(由灵灯系统替代) } } } \ No newline at end of file diff --git a/unity/Assets/2.5D Engine/Scripts/SwordAttack.cs b/unity/Assets/2.5D Engine/Scripts/SwordAttack.cs index 7bf7bd8..bf02fab 100644 --- a/unity/Assets/2.5D Engine/Scripts/SwordAttack.cs +++ b/unity/Assets/2.5D Engine/Scripts/SwordAttack.cs @@ -37,11 +37,7 @@ namespace IndianOceanAssets.Engine2_5D else if (input.x < 0) transform.localScale = new Vector3(-Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z); - // Trigger slash when attack key is pressed - if (Input.GetKeyDown(attackKeyCode)) - { - Slash(); - } + // 攻击输入已移除(由灵灯系统替代) } // Executes the sword slash logic diff --git a/unity/UserSettings/EditorUserSettings.asset b/unity/UserSettings/EditorUserSettings.asset index 12bcbd5..0e02cd4 100644 --- a/unity/UserSettings/EditorUserSettings.asset +++ b/unity/UserSettings/EditorUserSettings.asset @@ -27,14 +27,14 @@ EditorUserSettings: value: 5300055151055f5a5e0c0f27477708444515192b287124367c791f30b3b9616d flags: 0 RecentlyUsedSceneGuid-7: - value: 0209025f575750595c57092149765d444e4e49727e7c7068757b1c65b6e36c3b - flags: 0 - RecentlyUsedSceneGuid-8: value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a flags: 0 - RecentlyUsedSceneGuid-9: + RecentlyUsedSceneGuid-8: value: 5a55515156575a0b0f56592346260f444f16197c7e7f24697d2a4a32b1b0353e flags: 0 + RecentlyUsedSceneGuid-9: + value: 0209025f575750595c57092149765d444e4e49727e7c7068757b1c65b6e36c3b + flags: 0 UnityEditor.ShaderGraph.Blackboard: value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9af8ffaeffff8e85dd8390e3949c8899daa7 flags: 0