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

View File

@ -134,6 +134,7 @@ GameObject:
- component: {fileID: 123179489}
- component: {fileID: 123179488}
- component: {fileID: 123179486}
- component: {fileID: 123179490}
m_Layer: 0
m_Name: UICamera
m_TagString: Untagged
@ -251,6 +252,18 @@ Transform:
m_Children: []
m_Father: {fileID: 2081420527}
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
GameObject:
m_ObjectHideFlags: 0

View File

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

View File

@ -55,6 +55,7 @@ namespace Gameplay.LoadingExecutor
protected override void _OnEnd()
{
LevelManager.Instance.IsInGame = true;
LevelManager.Instance.ReportEnterLevel();
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 IsOver;
public bool IsTimeEnd;
public bool IsInGame;
public int Step;
public float ElapsedTime;
@ -588,6 +589,11 @@ namespace Gameplay.Manager
#endregion
public bool CanCheckInput()
{
return IsInGame && !IsOver && !IsPause;
}
public void Release()
{
IsPause = false;
@ -596,6 +602,7 @@ namespace Gameplay.Manager
IsFail2AddTime = false;
IsWatchAD = false;
CanGfxCoin = false;
IsInGame = false;
ReleaseGfx();
UnRegisterEvent();