【bug】更换关卡

iOS_release
zhangaotian 2024-07-30 16:04:11 +08:00
parent 5c6577f6fc
commit 5fe3254e65
5 changed files with 78 additions and 85 deletions

View File

@ -1,6 +1,6 @@
{ {
"columnCount": 5, "columnCount": 5,
"rowCount": 7, "rowCount": 5,
"undoCount": 0, "undoCount": 0,
"addTimeCount": 0, "addTimeCount": 0,
"openHoleCount": 0, "openHoleCount": 0,
@ -12,9 +12,7 @@
3, 3,
4, 4,
5, 5,
6,
7, 7,
8,
9, 9,
10, 10,
11, 11,
@ -30,48 +28,34 @@
21, 21,
22, 22,
23, 23,
24, 24
25,
26,
27,
28,
29,
30,
31,
32,
33,
34
], ],
"emptyHoleIndex": [ "emptyHoleIndex": [
15, 0,
16, 4,
17, 20,
18, 22,
19 24
], ],
"planksType": [ "planksType": [
0, 0,
0, 0,
0, 0,
0, 1,
0, 1,
0,
0,
0,
2, 2,
2, 2,
2, 7,
2 9,
11
], ],
"squareType": [ "squareType": [
3,
3,
3,
3,
3, 3,
3, 3,
1, 1,
1, 1,
1,
4,
4, 4,
4, 4,
4, 4,
@ -79,80 +63,61 @@
], ],
"HolesOfPlanksIndex": [ "HolesOfPlanksIndex": [
[ [
25, 15,
26, 16,
27, 17,
28, 18,
29 19
], ],
[ [
5, 5,
6,
7, 7,
8,
9 9
], ],
[ [
30,
31,
32,
33,
34
],
[
0,
1, 1,
2, 2,
3, 3
4 ],
[
9,
14,
19
],
[
5,
10,
15
],
[
13,
14,
18,
19
], ],
[ [
10, 10,
11, 11,
12, 15,
13, 16
14
], ],
[ [
20,
21,
22,
23,
24
],
[
26,
27,
28
],
[
6,
7, 7,
8 11,
12,
13
], ],
[ [
5, 17,
6,
10,
11
],
[
8,
9,
13, 13,
14 18,
23
], ],
[ [
23, 17,
24, 11,
28, 16,
29 21
],
[
20,
21,
25,
26
] ]
] ]
} }

View File

@ -134,6 +134,7 @@ GameObject:
- component: {fileID: 123179489} - component: {fileID: 123179489}
- component: {fileID: 123179488} - component: {fileID: 123179488}
- component: {fileID: 123179486} - component: {fileID: 123179486}
- component: {fileID: 123179490}
m_Layer: 0 m_Layer: 0
m_Name: UICamera m_Name: UICamera
m_TagString: Untagged m_TagString: Untagged
@ -251,6 +252,18 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 2081420527} m_Father: {fileID: 2081420527}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &123179490
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123179485}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fff49514adc6448d0a4cbea3ff37308b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &158007422 --- !u!1 &158007422
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,5 +1,6 @@
using PhxhSDK; using PhxhSDK;
using UnityEngine; using UnityEngine;
using Gameplay.Manager;
using Framework.Constants; using Framework.Constants;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
@ -67,7 +68,8 @@ namespace Framework.Manager
if (_isMousePressedLastFrame && !_mouseButtonAsFinger.isPressed) if (_isMousePressedLastFrame && !_mouseButtonAsFinger.isPressed)
{ {
Vector2 pos = CameraManager.Instance.MainCamera.ScreenToWorldPoint(currentMouse.position.ReadValue()); Vector2 pos = CameraManager.Instance.MainCamera.ScreenToWorldPoint(currentMouse.position.ReadValue());
if (!IsPointerOverUIObject(currentMouse.position.ReadValue())) if (!IsPointerOverUIObject(currentMouse.position.ReadValue()) ||
(LevelManager.Instance.CanCheckInput() && IsPointerOverUIObject(currentMouse.position.ReadValue())))
{ {
Check(pos); Check(pos);
} }
@ -84,6 +86,11 @@ namespace Framework.Manager
var pos = CameraManager.Instance.MainCamera.ScreenToWorldPoint(new Vector3(touch.screenPosition.x, var pos = CameraManager.Instance.MainCamera.ScreenToWorldPoint(new Vector3(touch.screenPosition.x,
touch.screenPosition.y, -Camera.main.transform.position.z)); touch.screenPosition.y, -Camera.main.transform.position.z));
if (IsPointerOverUIObject(touch) && LevelManager.Instance.CanCheckInput())
{
Check(pos);
}
if (IsPointerOverUIObject(touch)) if (IsPointerOverUIObject(touch))
{ {
return; return;

View File

@ -55,6 +55,7 @@ namespace Gameplay.LoadingExecutor
protected override void _OnEnd() protected override void _OnEnd()
{ {
LevelManager.Instance.IsInGame = true;
LevelManager.Instance.ReportEnterLevel(); LevelManager.Instance.ReportEnterLevel();
AudioManager.Instance.PlayMusic(AudioType.MUSIC, AudioManager.Instance.BGMInLevel, new UnityAudio(true)); AudioManager.Instance.PlayMusic(AudioType.MUSIC, AudioManager.Instance.BGMInLevel, new UnityAudio(true));
} }

View File

@ -28,6 +28,7 @@ namespace Gameplay.Manager
public bool IsPause; public bool IsPause;
public bool IsOver; public bool IsOver;
public bool IsTimeEnd; public bool IsTimeEnd;
public bool IsInGame;
public int Step; public int Step;
public float ElapsedTime; public float ElapsedTime;
@ -588,6 +589,11 @@ namespace Gameplay.Manager
#endregion #endregion
public bool CanCheckInput()
{
return IsInGame && !IsOver && !IsPause;
}
public void Release() public void Release()
{ {
IsPause = false; IsPause = false;
@ -596,6 +602,7 @@ namespace Gameplay.Manager
IsFail2AddTime = false; IsFail2AddTime = false;
IsWatchAD = false; IsWatchAD = false;
CanGfxCoin = false; CanGfxCoin = false;
IsInGame = false;
ReleaseGfx(); ReleaseGfx();
UnRegisterEvent(); UnRegisterEvent();