Merge commit 'df446a618c606898b0a7c1c57e7afef7bb079d74' into main_ZYT
# Conflicts: # ProjectSettings/EditorBuildSettings.asset # ProjectSettings/ProjectSettings.asset
This commit is contained in:
@@ -19486,6 +19486,16 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4739361030178029374, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -9.86
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4739361030178029374, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -1.77
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4741766977610483380, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@@ -19526,6 +19536,16 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6594359425886852104, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -10.89
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6594359425886852104, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -1.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6621853210474395341, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -19591,6 +19611,16 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7340799579585126712, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -4.82
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7340799579585126712, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.03
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7403620984591398492, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
@@ -19626,6 +19656,26 @@ PrefabInstance:
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 2147483647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8469844326909501225, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -8.16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8469844326909501225, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -1.92
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8483622650885395939, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -4.76
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8483622650885395939, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -1.92
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9014531264708592805, guid: 7350bae1a92e3a642b078895b43f47f1,
|
||||
type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
|
||||
@@ -83,6 +83,9 @@ public class GameManager : MonoBehaviour
|
||||
//HUDPanel.Show();
|
||||
//taskManager.bg.SetActive(true);
|
||||
//CreateEnemy(GameLocal.Ins.enemyPos.position, new Vector3(0,180,0));
|
||||
//宝石任务
|
||||
// enemy.SetState(1);
|
||||
// taskManager.curTaskId = 1;
|
||||
//拔萝卜任务
|
||||
// enemy.SetState(2);
|
||||
// taskManager.curTaskId = 2;
|
||||
|
||||
@@ -52,7 +52,6 @@ public class BubblesGem : MonoBehaviour
|
||||
if(gemTypeIndex==3)
|
||||
GameManager.Ins.taskManager.isGetGem = true;
|
||||
StartCoroutine(ShowGem());
|
||||
|
||||
}
|
||||
|
||||
IEnumerator ShowGem()
|
||||
@@ -62,43 +61,55 @@ public class BubblesGem : MonoBehaviour
|
||||
bubble.SetActive(false);
|
||||
preTx.SetActive(true);
|
||||
MasterAudio.StopAllSoundsOfTransform(transform);
|
||||
GameManager.Ins.PlaySound3DRPC("1.47",transform);
|
||||
GameManager.Ins.PlaySound3DRPC("1.47", transform);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
pre.SetActive(false);
|
||||
switch (gemType)
|
||||
{
|
||||
case SeekGemType.Fake:
|
||||
fakeGem.SetActive(true);
|
||||
fakeGem.GetComponent<Animator>().enabled = true;
|
||||
GameManager.Ins.PlaySound3DRPC("1.31",transform);
|
||||
GameManager.Ins.PlaySound3DRPC("1.31", transform);
|
||||
break;
|
||||
case SeekGemType.Punish:
|
||||
punishGem.SetActive(true);
|
||||
punishGem.GetComponent<Animator>().enabled = true;
|
||||
GameManager.Ins.PlaySound3DRPC("1.32",transform);
|
||||
GameManager.Ins.PlaySound3DRPC("1.32", transform);
|
||||
break;
|
||||
case SeekGemType.Real:
|
||||
realGem.SetActive(true);
|
||||
GameManager.Ins.PlaySound3DRPC("1.30",transform);
|
||||
GameManager.Ins.PlaySound3DRPC("1.30", transform);
|
||||
realGem.transform.DORotate(new Vector3(0, 360, 0), 2f, RotateMode.FastBeyond360)
|
||||
.SetEase(Ease.Linear)
|
||||
.SetLoops(-1); // -1 表示无限循环
|
||||
.SetLoops(-1);
|
||||
break;
|
||||
}
|
||||
|
||||
_isGet = false;
|
||||
|
||||
if (gemType == SeekGemType.Real)
|
||||
{
|
||||
// 开始飞向手
|
||||
LaunchTowards(GameManager.Ins.playerRightHand.transform);
|
||||
yield return !_isMove;
|
||||
|
||||
// ✅ 修复:等待飞行结束
|
||||
yield return new WaitUntil(() => !_isMove);
|
||||
|
||||
_isGet = true;
|
||||
GameManager.Ins.PlaySound2DRPC("1.9");
|
||||
|
||||
// 等待展示时间
|
||||
yield return new WaitForSeconds(4f);
|
||||
GameManager.Ins.taskManager.CompleteTask();
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
// ✅ 保险:确保自己销毁
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(_isMove)
|
||||
|
||||
@@ -28,7 +28,17 @@ public class BubblesGemTask : Task
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
item.GetComponent<BubblesGem>().GetGem(3);
|
||||
var bg = item.GetComponent<BubblesGem>();
|
||||
|
||||
// ✅ 打断 ShowGem 协程,避免冲突
|
||||
bg.StopAllCoroutines();
|
||||
|
||||
// 强制拿到真实宝石
|
||||
bg.gemType = SeekGemType.Real;
|
||||
bg.GetGem(3);
|
||||
|
||||
// 标记已经拿到
|
||||
GameManager.Ins.taskManager.isGetGem = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -37,6 +47,7 @@ public class BubblesGemTask : Task
|
||||
public override void CompleteTask()
|
||||
{
|
||||
base.CompleteTask();
|
||||
Debug.Log("删除泡泡宝石");
|
||||
foreach (var item in curGems)
|
||||
{
|
||||
Destroy(item);
|
||||
|
||||
@@ -63,6 +63,7 @@ public class TaskManager : MonoBehaviour
|
||||
|
||||
public void CompleteTask()
|
||||
{
|
||||
|
||||
tasks[curTaskId].CompleteTask();
|
||||
curTaskId++;
|
||||
taskHope.SetActive(false);
|
||||
|
||||
Reference in New Issue
Block a user