最终调整1
This commit is contained in:
@@ -196,7 +196,7 @@ namespace Core
|
||||
}
|
||||
|
||||
|
||||
private void UpdateCursorState()
|
||||
public void UpdateCursorState()
|
||||
{
|
||||
if (inputManager == null) return;
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ namespace Script.Gameplay.Facility
|
||||
[SerializeField] private GameObject WaveIcon;
|
||||
|
||||
private bool lastSendSignal = false;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 初始化图标显示
|
||||
@@ -90,10 +96,17 @@ namespace Script.Gameplay.Facility
|
||||
private void CheckNumberAndSendSignal()
|
||||
{
|
||||
bool isCorrect = currentNumber == correctNumber;
|
||||
if (lastSendSignal != isCorrect)
|
||||
if (lastSendSignal == false && isCorrect)
|
||||
{
|
||||
SendSignal(isCorrect, this.gameObject);
|
||||
lastSendSignal = isCorrect;
|
||||
// 发送true信号
|
||||
SendSignal(true, this.gameObject);
|
||||
lastSendSignal = true;
|
||||
}
|
||||
else if (lastSendSignal == true && !isCorrect)
|
||||
{
|
||||
// 发送false信号
|
||||
SendSignal(false, this.gameObject);
|
||||
lastSendSignal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,11 @@ namespace Script.Gameplay.Global
|
||||
|
||||
private void Start()
|
||||
{
|
||||
OnBugHappenedInArea.AddListener(() => { Debug.Log("天核区域内检测到BUG立方体!"); });
|
||||
OnBugHappenedInArea.AddListener(() =>
|
||||
{
|
||||
GameManager.Instance.EndGameplay();
|
||||
Debug.Log("天核区域内检测到BUG立方体!");
|
||||
});
|
||||
|
||||
GameManager.Instance.OnGameStart += GenerateBugCubes;
|
||||
}
|
||||
|
||||
@@ -29,12 +29,18 @@ namespace Script.Gameplay.Global
|
||||
OnGameStart?.Invoke();
|
||||
}
|
||||
|
||||
public void EndGameplay()
|
||||
{
|
||||
ScenesManager.Instance.LoadGameplay("End");
|
||||
}
|
||||
|
||||
public IEnumerator ReStartGame()
|
||||
{
|
||||
StartCoroutine(ScreenGlitchManager.Instance.TriggerGlitchEffect());
|
||||
yield return new WaitForSeconds(1.0f);
|
||||
ScenesManager.Instance.LoadGameplay(currentStartGameMode);
|
||||
OnGameStart?.Invoke();
|
||||
UIManager.Instance.UpdateCursorState();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Assets/Script/Shader/BugGlit.mat
Normal file
66
Assets/Script/Shader/BugGlit.mat
Normal file
@@ -0,0 +1,66 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6171656779237154942
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BugGlit
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 7d84f38f95b036341be84c3534ef9627,
|
||||
type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENUM_GRADIENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _Texture:
|
||||
m_Texture: {fileID: 2800000, guid: eb30a06c278a96d448183ff3807f170f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ENUM: 0
|
||||
- _Frequency: 0.56
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _Range: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Script/Shader/BugGlit.mat.meta
Normal file
8
Assets/Script/Shader/BugGlit.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a72b6e9c1c0f08b49b0636385e945848
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user