Skip to content

Commit 3dbe4c0

Browse files
authored
Merge pull request #22 from aaasoft/main
发布版本1.0.4
2 parents 0b4f9d2 + 5cc3a70 commit 3dbe4c0

File tree

12 files changed

+1043
-74
lines changed

12 files changed

+1043
-74
lines changed

Assets/Game/GamePlay/Scripts/BallManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using BallancePhysics.Wapper;
1212
using UnityEngine;
1313
using UnityEngine.Animations;
14-
using UnityEngine.InputSystem;
1514
using UnityEngine.InputSystem.LowLevel;
1615
using static Ballance2.Services.GameManager;
1716

Assets/Game/GamePlay/Scripts/GamePlayManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ private void _InitKeyEvents()
312312
else
313313
this.ResumeLevel();
314314
}
315-
}, GamepadButton.Start);
315+
}, GamepadButton.Select, GamepadButton.Start);
316316
}
317317
private void _InitSettings()
318318
{

Assets/Game/GamePlay/Scripts/Preview/GamePreviewManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void Awake() {
6666
else
6767
ResumeLevel();
6868
}
69-
},GamepadButton.Start);
69+
},GamepadButton.Select,GamepadButton.Start);
7070
return false;
7171
});
7272
}

Assets/Game/Menu/Prefabs/Pages/PageSettingsControlsMobile.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ PrefabInstance:
11891189
objectReference: {fileID: 0}
11901190
- target: {fileID: 7033815402476303036, guid: 943dd3c0e7cff344b94a30d9844d13cb, type: 3}
11911191
propertyPath: MinValue
1192-
value: -150
1192+
value: 0
11931193
objectReference: {fileID: 0}
11941194
- target: {fileID: 7033815402476303036, guid: 943dd3c0e7cff344b94a30d9844d13cb, type: 3}
11951195
propertyPath: AppendText

Assets/Game/Menu/Scripts/Game/GamePlayUIControl.cs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,26 @@ public class GamePlayUIControl : GameSingletonBehavior<GamePlayUIControl>
3636
private void Start() {
3737
_ScoreBoardActive.gameObject.SetActive(false);
3838

39-
//手机端还需要创建键盘
40-
#if (UNITY_ANDROID || UNITY_IOS)
41-
_CurrentMobileKeyPadShow = true;
42-
ReBuildMobileKeyPad();
43-
GamePlayManager.Instance.EventBeforeStart.On((evt) => {
44-
_CurrentMobileKeyPadShow = true;
45-
if (_CurrentMobileKeyPad != null)
46-
_CurrentMobileKeyPad.gameObject.SetActive(true);
47-
});
48-
GamePlayManager.Instance.EventQuit.On((evt) => {
49-
_CurrentMobileKeyPadShow = false;
50-
if (_CurrentMobileKeyPad != null)
51-
_CurrentMobileKeyPad.gameObject.SetActive(false);
52-
});
39+
//手机端还需要创建键盘
40+
#if (UNITY_ANDROID || UNITY_IOS)
41+
//当前设备存在触摸屏时,才允许显示屏幕键盘
42+
if (UnityEngine.InputSystem.Touchscreen.current != null)
43+
{
44+
_CurrentMobileKeyPadShow = true;
45+
ReBuildMobileKeyPad();
46+
GamePlayManager.Instance.EventBeforeStart.On((evt) =>
47+
{
48+
_CurrentMobileKeyPadShow = true;
49+
if (_CurrentMobileKeyPad != null)
50+
_CurrentMobileKeyPad.gameObject.SetActive(true);
51+
});
52+
GamePlayManager.Instance.EventQuit.On((evt) =>
53+
{
54+
_CurrentMobileKeyPadShow = false;
55+
if (_CurrentMobileKeyPad != null)
56+
_CurrentMobileKeyPad.gameObject.SetActive(false);
57+
});
58+
}
5359
#endif
5460

5561
//创建调试信息
@@ -118,8 +124,8 @@ internal void ReBuildMobileKeyPad() {
118124

119125
//创建键盘
120126
_CurrentMobileKeyPad = GameUIManager.Instance.InitViewToCanvas(keyPad.prefab, "GameMobileKeypad", false);
121-
//当屏幕键盘不显示,或者当前设备不支持触摸操作时。取消激活屏幕键盘
122-
if (!_CurrentMobileKeyPadShow || !Input.touchSupported)
127+
//当屏幕键盘不显示
128+
if (!_CurrentMobileKeyPadShow)
123129
_CurrentMobileKeyPad.gameObject.SetActive(false);
124130
}
125131

Assets/Scenes/Main.unity

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -850,17 +850,17 @@ MonoBehaviour:
850850
m_MoveRepeatDelay: 0.5
851851
m_MoveRepeatRate: 0.1
852852
m_XRTrackingOrigin: {fileID: 0}
853-
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
854-
m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
855-
m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
856-
m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
857-
m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
858-
m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
859-
m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
860-
m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
861-
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
862-
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
863-
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
853+
m_ActionsAsset: {fileID: -944628639613478452, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
854+
m_PointAction: {fileID: -1654692200621890270, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
855+
m_MoveAction: {fileID: -8784545083839296357, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
856+
m_SubmitAction: {fileID: 392368643174621059, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
857+
m_CancelAction: {fileID: 7727032971491509709, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
858+
m_LeftClickAction: {fileID: 3001919216989983466, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
859+
m_MiddleClickAction: {fileID: -2185481485913320682, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
860+
m_RightClickAction: {fileID: -4090225696740746782, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
861+
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
862+
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
863+
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: 5587d74f8c754e94ab9bdfdcbb410507, type: 3}
864864
m_DeselectOnBackgroundClick: 1
865865
m_PointerBehavior: 0
866866
m_CursorLockBehavior: 0

Assets/System/Inputs.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)