Fix issues with edit ui and more
This commit is contained in:
6 files changed
+8
-1882
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -1967,7 +1967,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8e4353c3e16b539839e7f8d301ca5e38, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
uiName: ScoreText
|
||||
uiName: ScoreTextCustom
|
||||
canDrag: 0
|
||||
--- !u!114 &432923594
|
||||
MonoBehaviour:
|
||||
@@ -6352,7 +6352,6 @@ GameObject:
|
||||
- component: {fileID: 1422150712}
|
||||
- component: {fileID: 1422150716}
|
||||
- component: {fileID: 1422150715}
|
||||
- component: {fileID: 1422150714}
|
||||
- component: {fileID: 1422150713}
|
||||
- component: {fileID: 1422150717}
|
||||
- component: {fileID: 1422150718}
|
||||
@@ -6398,20 +6397,6 @@ MonoBehaviour:
|
||||
invert: 0
|
||||
addMore: {r: 0, g: 0, b: 0, a: 0}
|
||||
reverseAdd: 0
|
||||
--- !u!114 &1422150714
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1422150711}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8e4353c3e16b539839e7f8d301ca5e38, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
uiName: CoinsText
|
||||
canDrag: 0
|
||||
--- !u!114 &1422150715
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -36,7 +36,6 @@ public class AutoGamePlayer : MonoBehaviour {
|
||||
[SerializeField] private GameObject pausePanel;
|
||||
[SerializeField] private Rigidbody2D rb;
|
||||
public AudioSource backgroundMusic;
|
||||
[SerializeField] private SpriteRenderer overlayRender;
|
||||
private float lastMoveTime;
|
||||
[SerializeField] private GameObject berryParent;
|
||||
[SerializeField] private TMP_Text levelText;
|
||||
|
||||
@@ -14,13 +14,8 @@ public class AutoGamePlayerPauseMenu : MonoBehaviour {
|
||||
[SerializeField] private TMP_Text scoreText;
|
||||
[SerializeField] private TMP_Text highScoreText;
|
||||
[SerializeField] private TMP_Text boostText;
|
||||
[SerializeField] private TMP_Text coinsText;
|
||||
[SerializeField] private TMP_Text levelText;
|
||||
[SerializeField] private Button pauseButton;
|
||||
[SerializeField] private Button restartButton;
|
||||
[SerializeField] private Button jumpButton;
|
||||
[SerializeField] private Button rightButton;
|
||||
[SerializeField] private Button leftButton;
|
||||
internal bool editingUI = false;
|
||||
|
||||
public GameObject statsMenu;
|
||||
@@ -52,8 +47,7 @@ public class AutoGamePlayerPauseMenu : MonoBehaviour {
|
||||
((RectTransform)scoreText.transform).anchoredPosition = new Vector2(0f, -70f);
|
||||
((RectTransform)highScoreText.transform).anchoredPosition = new Vector2(0f, -140f);
|
||||
((RectTransform)boostText.transform).anchoredPosition = new Vector2(0f, -190f);
|
||||
((RectTransform)coinsText.transform).anchoredPosition = new Vector2(260f, 47.5f);
|
||||
((RectTransform)levelText.transform).anchoredPosition = new Vector2(-260f, 85f);
|
||||
((RectTransform)levelText.transform).anchoredPosition = new Vector2(-290f, 85f);
|
||||
PlayerPrefs.DeleteKey("DraggedUIScoreText");
|
||||
PlayerPrefs.DeleteKey("DraggedUIHighScoreText");
|
||||
PlayerPrefs.DeleteKey("DraggedUIBoostText");
|
||||
@@ -61,10 +55,6 @@ public class AutoGamePlayerPauseMenu : MonoBehaviour {
|
||||
PlayerPrefs.DeleteKey("DraggedUILevelText");
|
||||
if (Application.isMobilePlatform) {
|
||||
((RectTransform)pauseButton.transform).anchoredPosition = new Vector2(128f, -128f);
|
||||
((RectTransform)restartButton.transform).anchoredPosition = new Vector2(-128f, -128f);
|
||||
((RectTransform)jumpButton.transform).anchoredPosition = new Vector2(-128f, 288f);
|
||||
((RectTransform)rightButton.transform).anchoredPosition = new Vector2(-128f, 128f);
|
||||
((RectTransform)leftButton.transform).anchoredPosition = new Vector2(128f, 128f);
|
||||
PlayerPrefs.DeleteKey("DraggedUIPauseButton");
|
||||
PlayerPrefs.DeleteKey("DraggedUIRestartButton");
|
||||
PlayerPrefs.DeleteKey("DraggedUIJumpButton");
|
||||
@@ -139,27 +129,12 @@ public class AutoGamePlayerPauseMenu : MonoBehaviour {
|
||||
scoreText.GetComponent<DraggableUI>().canDrag = !scoreText.GetComponent<DraggableUI>().canDrag;
|
||||
highScoreText.GetComponent<DraggableUI>().canDrag = !highScoreText.GetComponent<DraggableUI>().canDrag;
|
||||
boostText.GetComponent<DraggableUI>().canDrag = !boostText.GetComponent<DraggableUI>().canDrag;
|
||||
coinsText.GetComponent<DraggableUI>().canDrag = !coinsText.GetComponent<DraggableUI>().canDrag;
|
||||
levelText.GetComponent<DraggableUI>().canDrag = !levelText.GetComponent<DraggableUI>().canDrag;
|
||||
if (Application.isMobilePlatform) {
|
||||
var pauseDraggableUI = pauseButton.GetComponent<DraggableUI>();
|
||||
var restartDraggableUI = restartButton.GetComponent<DraggableUI>();
|
||||
var jumpDraggableUI = jumpButton.GetComponent<DraggableUI>();
|
||||
var rightDraggableUI = rightButton.GetComponent<DraggableUI>();
|
||||
var leftDraggableUI = leftButton.GetComponent<DraggableUI>();
|
||||
pauseButton.transform.parent.SetSiblingIndex(pauseDraggableUI.canDrag ? 0 : 2);
|
||||
pauseDraggableUI.canDrag = !pauseDraggableUI.canDrag;
|
||||
restartDraggableUI.canDrag = !restartDraggableUI.canDrag;
|
||||
jumpDraggableUI.canDrag = !jumpDraggableUI.canDrag;
|
||||
rightDraggableUI.canDrag = !rightDraggableUI.canDrag;
|
||||
leftDraggableUI.canDrag = !leftDraggableUI.canDrag;
|
||||
pauseButton.interactable = !pauseDraggableUI.canDrag;
|
||||
restartButton.interactable = !restartDraggableUI.canDrag;
|
||||
jumpButton.interactable = !jumpDraggableUI.canDrag;
|
||||
rightButton.interactable = !rightDraggableUI.canDrag;
|
||||
leftButton.interactable = !leftDraggableUI.canDrag;
|
||||
jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = !jumpDraggableUI.canDrag ? AutoGamePlayer.Instance.isGrounded ? Color.white : Color.red : Color.white;
|
||||
restartButton.interactable = AutoGamePlayer.Instance.score != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
||||
resetUiButton.onClick.AddListener(() => {
|
||||
((RectTransform)scoreText.transform).anchoredPosition = new Vector2(0f, -70f);
|
||||
((RectTransform)boostText.transform).anchoredPosition = new Vector2(0f, -140f);
|
||||
PlayerPrefs.DeleteKey("DraggedUIScoreText");
|
||||
PlayerPrefs.DeleteKey("DraggedUIScoreTextCustom");
|
||||
PlayerPrefs.DeleteKey("DraggedUIBoostTextCustom");
|
||||
if (Application.isMobilePlatform) {
|
||||
((RectTransform)pauseButton.transform).anchoredPosition = new Vector2(128f, -128f);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
||||
((RectTransform)highScoreText.transform).anchoredPosition = new Vector2(0f, -140f);
|
||||
((RectTransform)boostText.transform).anchoredPosition = new Vector2(0f, -190f);
|
||||
((RectTransform)coinsText.transform).anchoredPosition = new Vector2(260f, 47.5f);
|
||||
((RectTransform)levelText.transform).anchoredPosition = new Vector2(-260f, 85f);
|
||||
((RectTransform)levelText.transform).anchoredPosition = new Vector2(-290f, 85f);
|
||||
PlayerPrefs.DeleteKey("DraggedUIScoreText");
|
||||
PlayerPrefs.DeleteKey("DraggedUIHighScoreText");
|
||||
PlayerPrefs.DeleteKey("DraggedUIBoostText");
|
||||
|
||||
Reference in new issue
Block a user