chore: initial commit
This commit is contained in:
0
Assets/Scripts/Parry/.gitkeep
Normal file
0
Assets/Scripts/Parry/.gitkeep
Normal file
14
Assets/Scripts/Parry/BaseGames.Parry.asmdef
Normal file
14
Assets/Scripts/Parry/BaseGames.Parry.asmdef
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"precompiledReferences": [],
|
||||
"name": "BaseGames.Parry",
|
||||
"defineConstraints": [],
|
||||
"noEngineReferences": false,
|
||||
"versionDefines": [],
|
||||
"rootNamespace": "BaseGames.Parry",
|
||||
"references": [],
|
||||
"autoReferenced": true,
|
||||
"overrideReferences": false,
|
||||
"includePlatforms": []
|
||||
}
|
||||
7
Assets/Scripts/Parry/BaseGames.Parry.asmdef.meta
Normal file
7
Assets/Scripts/Parry/BaseGames.Parry.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87e177cce09e78a44b5122b4acfe5763
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/Scripts/Parry/ParrySystem.cs
Normal file
30
Assets/Scripts/Parry/ParrySystem.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BaseGames.Parry
|
||||
{
|
||||
/// <summary>
|
||||
/// 弹反状态管理器。Phase 1 桩 — Phase 2 实现。
|
||||
/// 只负责维护「当前是否处于弹反窗口」,不感知任何伤害数据类型。
|
||||
/// HurtBox(Combat 层)主动调用 ConsumeParry() 来查询并消费弹反机会。
|
||||
/// </summary>
|
||||
public class ParrySystem : MonoBehaviour
|
||||
{
|
||||
/// <summary>当前是否处于弹反激活窗口。Phase 2 由输入/动画事件写入。</summary>
|
||||
public bool IsParrying { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询并消费一次弹反机会。
|
||||
/// 若处于弹反窗口则返回 true 并关闭窗口;否则返回 false。
|
||||
/// </summary>
|
||||
public bool ConsumeParry()
|
||||
{
|
||||
if (!IsParrying) return false;
|
||||
IsParrying = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Phase 2:由动画事件 / InputReader 调用以开启弹反窗口
|
||||
public void OpenParryWindow() => IsParrying = true;
|
||||
public void CloseParryWindow() => IsParrying = false;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Parry/ParrySystem.cs.meta
Normal file
11
Assets/Scripts/Parry/ParrySystem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14872ec0b53eece49a121f13ca519009
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3
Assets/Scripts/Parry/_Placeholder.cs
Normal file
3
Assets/Scripts/Parry/_Placeholder.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
// Placeholder to prevent asmdef-no-scripts warning.
|
||||
namespace BaseGames.Parry { }
|
||||
|
||||
11
Assets/Scripts/Parry/_Placeholder.cs.meta
Normal file
11
Assets/Scripts/Parry/_Placeholder.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 521bdf598b4b7c046a783ff8f0258c5e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user