Move GamePlayers to their own folders, and add coin berries to normal pause menu, and add attempts to custom mode
This commit is contained in:
17 files changed
+73
-34
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cad65945509814812b143fc846c7cf3d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+1
-2
@@ -476,7 +476,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Assembly-CSharp::CustomGamePlayerPauseMenu
|
m_EditorClassIdentifier: Assembly-CSharp::CustomGamePlayerPauseMenu
|
||||||
backButton: {fileID: 2053870143}
|
backButton: {fileID: 2053870143}
|
||||||
continueButton: {fileID: 1382735446}
|
continueButton: {fileID: 1382735446}
|
||||||
statsButton: {fileID: 0}
|
|
||||||
editUiButton: {fileID: 1515878564}
|
editUiButton: {fileID: 1515878564}
|
||||||
resetUiButton: {fileID: 360727558}
|
resetUiButton: {fileID: 360727558}
|
||||||
songLoop: {fileID: 1625416039}
|
songLoop: {fileID: 1625416039}
|
||||||
@@ -1876,7 +1875,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: 'Score: 0'
|
m_text: 'Score: 0 \u2022 Attempts: 0'
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||||
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 770cd0d0b059f463588d509083a1daf1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+19
-14
@@ -7,10 +7,11 @@ using UnityEngine.SceneManagement;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class CustomGamePlayer : MonoBehaviour {
|
public class CustomGamePlayer : MonoBehaviour {
|
||||||
public static CustomGamePlayer instance;
|
public static CustomGamePlayer Instance;
|
||||||
private readonly float spawnRate = 1f;
|
private readonly float spawnRate = 1f;
|
||||||
private float nextSpawnTime;
|
private float nextSpawnTime;
|
||||||
internal BigInteger score;
|
internal BigInteger score;
|
||||||
|
private BigInteger attempts;
|
||||||
private float boostLeft;
|
private float boostLeft;
|
||||||
private float slownessLeft;
|
private float slownessLeft;
|
||||||
private float speedyLeft;
|
private float speedyLeft;
|
||||||
@@ -45,6 +46,10 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
private float goldenBerryChance;
|
private float goldenBerryChance;
|
||||||
private float nothingBerryChance;
|
private float nothingBerryChance;
|
||||||
|
|
||||||
|
void Awake() {
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
CustomGameTempData customGameTempData = FindObjectsByType<CustomGameTempData>(FindObjectsSortMode.None)[0];
|
CustomGameTempData customGameTempData = FindObjectsByType<CustomGameTempData>(FindObjectsSortMode.None)[0];
|
||||||
if (customGameTempData == null) {
|
if (customGameTempData == null) {
|
||||||
@@ -123,14 +128,13 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
|
|
||||||
lastMoveTime = Time.time;
|
lastMoveTime = Time.time;
|
||||||
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
||||||
instance = this;
|
|
||||||
|
|
||||||
Cursor.visible = false;
|
Cursor.visible = false;
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
backgroundMusic.volume = BazookaManager.Instance.GetSettingMusicVolume();
|
backgroundMusic.volume = BazookaManager.Instance.GetSettingMusicVolume();
|
||||||
screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect;
|
screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect;
|
||||||
if (Application.isMobilePlatform) mobileButtons.SetActive(true);
|
if (Application.isMobilePlatform) mobileButtons.SetActive(true);
|
||||||
UpdateStats(0);
|
UpdateStats(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveBird() {
|
void MoveBird() {
|
||||||
@@ -528,7 +532,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
slownessLeft = 0f;
|
slownessLeft = 0f;
|
||||||
speedyLeft = 0f;
|
speedyLeft = 0f;
|
||||||
antiLeft = 0f;
|
antiLeft = 0f;
|
||||||
UpdateStats(0);
|
UpdateStats(0, 1);
|
||||||
|
|
||||||
GameObject[] allberries = GameObject.FindGameObjectsWithTag("NormalBerry")
|
GameObject[] allberries = GameObject.FindGameObjectsWithTag("NormalBerry")
|
||||||
.Concat(GameObject.FindGameObjectsWithTag("PoisonBerry"))
|
.Concat(GameObject.FindGameObjectsWithTag("PoisonBerry"))
|
||||||
@@ -545,9 +549,10 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateStats(BigInteger scoreAddAmount) {
|
void UpdateStats(BigInteger scoreAddAmount, BigInteger attemptAddAmount) {
|
||||||
score += scoreAddAmount;
|
score += scoreAddAmount;
|
||||||
scoreText.text = $"Score: {Tools.FormatWithCommas(score)}";
|
attempts += attemptAddAmount;
|
||||||
|
scoreText.text = $"Score: {Tools.FormatWithCommas(score)} \\u2022 Attempts: {Tools.FormatWithCommas(attempts)}";
|
||||||
if (Application.isMobilePlatform) restartButton.interactable = score != 0;
|
if (Application.isMobilePlatform) restartButton.interactable = score != 0;
|
||||||
if (DiscordRPCHandler.Instance != null)
|
if (DiscordRPCHandler.Instance != null)
|
||||||
DiscordRPCHandler.Instance.UpdateRPC("Playing in custom mode", "Score: " + Tools.FormatWithCommas(score));
|
DiscordRPCHandler.Instance.UpdateRPC("Playing in custom mode", "Score: " + Tools.FormatWithCommas(score));
|
||||||
@@ -601,13 +606,13 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
void DoNormalBerry(GameObject berry) {
|
void DoNormalBerry(GameObject berry) {
|
||||||
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Eat"), Camera.main.transform.position, 1.2f * BazookaManager.Instance.GetSettingSFXVolume());
|
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Eat"), Camera.main.transform.position, 1.2f * BazookaManager.Instance.GetSettingSFXVolume());
|
||||||
Destroy(berry);
|
Destroy(berry);
|
||||||
UpdateStats(1);
|
UpdateStats(1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoPoisonBerry() {
|
void DoPoisonBerry() {
|
||||||
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Death"), Camera.main.transform.position, 1.2f * BazookaManager.Instance.GetSettingSFXVolume());
|
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Death"), Camera.main.transform.position, 1.2f * BazookaManager.Instance.GetSettingSFXVolume());
|
||||||
Respawn();
|
Respawn();
|
||||||
UpdateStats(0);
|
UpdateStats(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoSlowBerry(GameObject berry) {
|
void DoSlowBerry(GameObject berry) {
|
||||||
@@ -619,7 +624,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
antiLeft = 0f;
|
antiLeft = 0f;
|
||||||
goldenLeft = 0f;
|
goldenLeft = 0f;
|
||||||
if (score > 0) {
|
if (score > 0) {
|
||||||
UpdateStats(-1);
|
UpdateStats(-1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,10 +636,10 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
goldenLeft = 0f;
|
goldenLeft = 0f;
|
||||||
if (slownessLeft > 0f) {
|
if (slownessLeft > 0f) {
|
||||||
slownessLeft = 0f;
|
slownessLeft = 0f;
|
||||||
UpdateStats(1);
|
UpdateStats(1, 0);
|
||||||
} else {
|
} else {
|
||||||
boostLeft += 10f;
|
boostLeft += 10f;
|
||||||
UpdateStats(5);
|
UpdateStats(5, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -646,7 +651,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
speedyLeft = 10f;
|
speedyLeft = 10f;
|
||||||
antiLeft = 0f;
|
antiLeft = 0f;
|
||||||
goldenLeft = 0f;
|
goldenLeft = 0f;
|
||||||
UpdateStats(10);
|
UpdateStats(10, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAntiBerry(GameObject berry) {
|
void DoAntiBerry(GameObject berry) {
|
||||||
@@ -657,7 +662,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
speedyLeft = 0f;
|
speedyLeft = 0f;
|
||||||
antiLeft = 10f;
|
antiLeft = 10f;
|
||||||
goldenLeft = 0f;
|
goldenLeft = 0f;
|
||||||
UpdateStats(0);
|
UpdateStats(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoGoldenBerry(GameObject berry) {
|
void DoGoldenBerry(GameObject berry) {
|
||||||
@@ -668,7 +673,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
|||||||
speedyLeft = 0f;
|
speedyLeft = 0f;
|
||||||
antiLeft = 0f;
|
antiLeft = 0f;
|
||||||
goldenLeft = 10f;
|
goldenLeft = 10f;
|
||||||
UpdateStats(4);
|
UpdateStats(4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoNothingBerry(GameObject berry) {
|
void DoNothingBerry(GameObject berry) {
|
||||||
File renamed without changes.
+4
-6
@@ -6,7 +6,6 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
|||||||
public static CustomGamePlayerPauseMenu Instance;
|
public static CustomGamePlayerPauseMenu Instance;
|
||||||
[SerializeField] private Button backButton;
|
[SerializeField] private Button backButton;
|
||||||
[SerializeField] private Button continueButton;
|
[SerializeField] private Button continueButton;
|
||||||
[SerializeField] private Button statsButton;
|
|
||||||
[SerializeField] private Button editUiButton;
|
[SerializeField] private Button editUiButton;
|
||||||
[SerializeField] private Button resetUiButton;
|
[SerializeField] private Button resetUiButton;
|
||||||
[SerializeField] private AudioSource songLoop;
|
[SerializeField] private AudioSource songLoop;
|
||||||
@@ -29,7 +28,7 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
|||||||
|
|
||||||
void Awake() {
|
void Awake() {
|
||||||
Instance = this;
|
Instance = this;
|
||||||
continueButton.onClick.AddListener(CustomGamePlayer.instance.DisablePause);
|
continueButton.onClick.AddListener(CustomGamePlayer.Instance.DisablePause);
|
||||||
musicSlider.onValueChanged.AddListener(value => {
|
musicSlider.onValueChanged.AddListener(value => {
|
||||||
BazookaManager.Instance.SetSettingMusicVolume(value);
|
BazookaManager.Instance.SetSettingMusicVolume(value);
|
||||||
songLoop.volume = value;
|
songLoop.volume = value;
|
||||||
@@ -83,7 +82,7 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
|||||||
settingRandomMusicToggle.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingRandomMusic(value));
|
settingRandomMusicToggle.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingRandomMusic(value));
|
||||||
musicSlider.onValueChanged.AddListener(value => {
|
musicSlider.onValueChanged.AddListener(value => {
|
||||||
BazookaManager.Instance.SetSettingMusicVolume(value);
|
BazookaManager.Instance.SetSettingMusicVolume(value);
|
||||||
CustomGamePlayer.instance.backgroundMusic.volume = value;
|
CustomGamePlayer.Instance.backgroundMusic.volume = value;
|
||||||
});
|
});
|
||||||
sfxSlider.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingSFXVolume(value));
|
sfxSlider.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingSFXVolume(value));
|
||||||
}
|
}
|
||||||
@@ -99,7 +98,6 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
|||||||
settingRandomMusicToggle.gameObject.SetActive(!settingRandomMusicToggle.gameObject.activeSelf);
|
settingRandomMusicToggle.gameObject.SetActive(!settingRandomMusicToggle.gameObject.activeSelf);
|
||||||
backButton.gameObject.SetActive(!backButton.gameObject.activeSelf);
|
backButton.gameObject.SetActive(!backButton.gameObject.activeSelf);
|
||||||
continueButton.gameObject.SetActive(!continueButton.gameObject.activeSelf);
|
continueButton.gameObject.SetActive(!continueButton.gameObject.activeSelf);
|
||||||
statsButton.gameObject.SetActive(!statsButton.gameObject.activeSelf);
|
|
||||||
editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text = editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text == "Edit UI" ? "Done" : "Edit UI";
|
editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text = editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text == "Edit UI" ? "Done" : "Edit UI";
|
||||||
resetUiButton.gameObject.SetActive(!resetUiButton.gameObject.activeSelf);
|
resetUiButton.gameObject.SetActive(!resetUiButton.gameObject.activeSelf);
|
||||||
scoreText.GetComponent<DraggableUI>().canDrag = !scoreText.GetComponent<DraggableUI>().canDrag;
|
scoreText.GetComponent<DraggableUI>().canDrag = !scoreText.GetComponent<DraggableUI>().canDrag;
|
||||||
@@ -121,8 +119,8 @@ public class CustomGamePlayerPauseMenu : MonoBehaviour {
|
|||||||
jumpButton.interactable = !jumpDraggableUI.canDrag;
|
jumpButton.interactable = !jumpDraggableUI.canDrag;
|
||||||
rightButton.interactable = !rightDraggableUI.canDrag;
|
rightButton.interactable = !rightDraggableUI.canDrag;
|
||||||
leftButton.interactable = !leftDraggableUI.canDrag;
|
leftButton.interactable = !leftDraggableUI.canDrag;
|
||||||
jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = !jumpDraggableUI.canDrag ? CustomGamePlayer.instance.isGrounded ? Color.white : Color.red : Color.white;
|
jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = !jumpDraggableUI.canDrag ? CustomGamePlayer.Instance.isGrounded ? Color.white : Color.red : Color.white;
|
||||||
restartButton.interactable = CustomGamePlayer.instance.score != 0;
|
restartButton.interactable = CustomGamePlayer.Instance.score != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
@@ -7,7 +7,7 @@ using UnityEngine.InputSystem;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class GamePlayer : MonoBehaviour {
|
public class GamePlayer : MonoBehaviour {
|
||||||
public static GamePlayer instance;
|
public static GamePlayer Instance;
|
||||||
private readonly float spawnRate = 1f;
|
private readonly float spawnRate = 1f;
|
||||||
private float nextSpawnTime;
|
private float nextSpawnTime;
|
||||||
internal BigInteger score;
|
internal BigInteger score;
|
||||||
@@ -51,6 +51,10 @@ public class GamePlayer : MonoBehaviour {
|
|||||||
[SerializeField] private Button rightButton;
|
[SerializeField] private Button rightButton;
|
||||||
[SerializeField] private Button leftButton;
|
[SerializeField] private Button leftButton;
|
||||||
|
|
||||||
|
void Awake() {
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
void Start() {
|
void Start() {
|
||||||
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
||||||
Camera.main.backgroundColor = new Color(
|
Camera.main.backgroundColor = new Color(
|
||||||
@@ -113,7 +117,6 @@ public class GamePlayer : MonoBehaviour {
|
|||||||
|
|
||||||
lastMoveTime = Time.time;
|
lastMoveTime = Time.time;
|
||||||
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
UnityEngine.InputSystem.EnhancedTouch.EnhancedTouchSupport.Enable();
|
||||||
instance = this;
|
|
||||||
highscore = BazookaManager.Instance.GetGameStoreHighScore();
|
highscore = BazookaManager.Instance.GetGameStoreHighScore();
|
||||||
totalNormalBerries = BazookaManager.Instance.GetGameStoreTotalNormalBerries();
|
totalNormalBerries = BazookaManager.Instance.GetGameStoreTotalNormalBerries();
|
||||||
totalPoisonBerries = BazookaManager.Instance.GetGameStoreTotalPoisonBerries();
|
totalPoisonBerries = BazookaManager.Instance.GetGameStoreTotalPoisonBerries();
|
||||||
File renamed without changes.
+5
-4
@@ -37,7 +37,7 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
|||||||
|
|
||||||
void Awake() {
|
void Awake() {
|
||||||
Instance = this;
|
Instance = this;
|
||||||
continueButton.onClick.AddListener(GamePlayer.instance.DisablePause);
|
continueButton.onClick.AddListener(GamePlayer.Instance.DisablePause);
|
||||||
musicSlider.onValueChanged.AddListener(value => {
|
musicSlider.onValueChanged.AddListener(value => {
|
||||||
BazookaManager.Instance.SetSettingMusicVolume(value);
|
BazookaManager.Instance.SetSettingMusicVolume(value);
|
||||||
songLoop.volume = value;
|
songLoop.volume = value;
|
||||||
@@ -80,6 +80,7 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
|||||||
text.AppendLine("Total Poison Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries()));
|
text.AppendLine("Total Poison Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries()));
|
||||||
text.AppendLine("Total Slow Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSlowBerries()));
|
text.AppendLine("Total Slow Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSlowBerries()));
|
||||||
text.AppendLine("Total Ultra Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalUltraBerries()));
|
text.AppendLine("Total Ultra Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalUltraBerries()));
|
||||||
|
text.AppendLine("Total Coin Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalCoinBerries()));
|
||||||
text.AppendLine("Total Speedy Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSpeedyBerries()));
|
text.AppendLine("Total Speedy Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSpeedyBerries()));
|
||||||
text.AppendLine("Total Random Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalRandomBerries()));
|
text.AppendLine("Total Random Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalRandomBerries()));
|
||||||
text.AppendLine("Total Anti Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalAntiBerries()));
|
text.AppendLine("Total Anti Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalAntiBerries()));
|
||||||
@@ -116,7 +117,7 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
|||||||
settingRandomMusicToggle.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingRandomMusic(value));
|
settingRandomMusicToggle.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingRandomMusic(value));
|
||||||
musicSlider.onValueChanged.AddListener(value => {
|
musicSlider.onValueChanged.AddListener(value => {
|
||||||
BazookaManager.Instance.SetSettingMusicVolume(value);
|
BazookaManager.Instance.SetSettingMusicVolume(value);
|
||||||
GamePlayer.instance.backgroundMusic.volume = value;
|
GamePlayer.Instance.backgroundMusic.volume = value;
|
||||||
});
|
});
|
||||||
sfxSlider.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingSFXVolume(value));
|
sfxSlider.onValueChanged.AddListener(value => BazookaManager.Instance.SetSettingSFXVolume(value));
|
||||||
}
|
}
|
||||||
@@ -157,8 +158,8 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
|||||||
jumpButton.interactable = !jumpDraggableUI.canDrag;
|
jumpButton.interactable = !jumpDraggableUI.canDrag;
|
||||||
rightButton.interactable = !rightDraggableUI.canDrag;
|
rightButton.interactable = !rightDraggableUI.canDrag;
|
||||||
leftButton.interactable = !leftDraggableUI.canDrag;
|
leftButton.interactable = !leftDraggableUI.canDrag;
|
||||||
jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = !jumpDraggableUI.canDrag ? GamePlayer.instance.isGrounded ? Color.white : Color.red : Color.white;
|
jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = !jumpDraggableUI.canDrag ? GamePlayer.Instance.isGrounded ? Color.white : Color.red : Color.white;
|
||||||
restartButton.interactable = GamePlayer.instance.score != 0;
|
restartButton.interactable = GamePlayer.Instance.score != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
@@ -0,0 +1,15 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class RainbowCamera : MonoBehaviour {
|
||||||
|
public float frequency = 1f;
|
||||||
|
[Range(0, 255)]
|
||||||
|
public int brightness = 255;
|
||||||
|
|
||||||
|
void Update() {
|
||||||
|
float t = Time.time * frequency;
|
||||||
|
float r = (Mathf.Sin(t) * 0.5f + 0.5f) * (brightness / 255f);
|
||||||
|
float g = (Mathf.Sin(t + 2f) * 0.5f + 0.5f) * (brightness / 255f);
|
||||||
|
float b = (Mathf.Sin(t + 4f) * 0.5f + 0.5f) * (brightness / 255f);
|
||||||
|
Camera.main.backgroundColor = new Color(r, g, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 978d421e3cbe74d80abe34cbf91014c5
|
||||||
@@ -14,15 +14,9 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/AccountMenu.unity
|
path: Assets/Scenes/AccountMenu.unity
|
||||||
guid: 61d560f45a39646489a33d9e871b5336
|
guid: 61d560f45a39646489a33d9e871b5336
|
||||||
- enabled: 1
|
|
||||||
path: Assets/Scenes/CustomGamePlayer.unity
|
|
||||||
guid: a34b74c5a1fc341178b14476e39597b3
|
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/ChatroomMenu.unity
|
path: Assets/Scenes/ChatroomMenu.unity
|
||||||
guid: 6d51f8ef1f7d4f01a8416e468a7ed278
|
guid: 6d51f8ef1f7d4f01a8416e468a7ed278
|
||||||
- enabled: 1
|
|
||||||
path: Assets/Scenes/GamePlayer.unity
|
|
||||||
guid: 8d9f90781cae8d24c8560dbca7ed6f42
|
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/IconMarketplaceMenu.unity
|
path: Assets/Scenes/IconMarketplaceMenu.unity
|
||||||
guid: 88bad8620907810c097277153f83e44c
|
guid: 88bad8620907810c097277153f83e44c
|
||||||
@@ -44,6 +38,12 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/UserSearchMenu.unity
|
path: Assets/Scenes/UserSearchMenu.unity
|
||||||
guid: 9824037642dab4ad5bcf9be82d6c3f4d
|
guid: 9824037642dab4ad5bcf9be82d6c3f4d
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/GamePlayers/CustomGamePlayer.unity
|
||||||
|
guid: a34b74c5a1fc341178b14476e39597b3
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/GamePlayers/GamePlayer.unity
|
||||||
|
guid: 8d9f90781cae8d24c8560dbca7ed6f42
|
||||||
m_configObjects:
|
m_configObjects:
|
||||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||||
m_UseUCBPForAssetBundles: 0
|
m_UseUCBPForAssetBundles: 0
|
||||||
Reference in new issue
Block a user