edit simon says puzzle
All checks were successful
Build project / Build for (StandaloneLinux64, 6000.0.37f1) (push) Successful in 4m51s
Build project / Build for (StandaloneWindows64, 6000.0.37f1) (push) Successful in 4m40s
Build project / Publish to itch.io (StandaloneLinux64) (push) Successful in 5s
Build project / Publish to itch.io (StandaloneWindows64) (push) Successful in 5s

This commit is contained in:
EthanPisani 2025-03-25 23:36:45 -04:00
parent 7018c0b3eb
commit 63824697f6
5 changed files with 686 additions and 461 deletions

View File

@ -20,7 +20,8 @@ public class SimonSaysPuzzle : MonoBehaviour
public GameObject failedScreen;
[SerializeField] SimonSaysGameManager gameManager = null;
public AudioClip loseSound;
public AudioClip winSound;
private bool isDoingPuzzle;
private Button clickedButton = null;
@ -86,6 +87,7 @@ public class SimonSaysPuzzle : MonoBehaviour
//game complete
print("Game Complete!");
gameManager.gameState = SGameState.Win;
SoundFXManager.instance.PlaySound(winSound, transform, 1.0f);
completeScreen.SetActive(true);
@ -119,6 +121,7 @@ public class SimonSaysPuzzle : MonoBehaviour
print("Game Failed!");
failedScreen.SetActive(true);
gameManager.gameState = SGameState.Lose;
SoundFXManager.instance.PlaySound(loseSound, transform, 1.0f);
EndPuzzle();

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ public class DoorInteraction : MonoBehaviour
[SerializeField] private UnityEngine.UI.Image tabletIcon = null;
[SerializeField] private TextMeshProUGUI closeTabletPrompt = null;
[SerializeField] private GameObject closeTabletPrompt = null;
public TabletScreen doorPuzzleType = TabletScreen.Mines;
@ -51,6 +51,7 @@ public class DoorInteraction : MonoBehaviour
{
interactionPrompt.enabled = false;
}
closeTabletPrompt.SetActive(false);
}
void OnDisable()
{
@ -192,10 +193,10 @@ public class DoorInteraction : MonoBehaviour
private IEnumerator WaitForPuzzleCompletion()
{
yield return new WaitUntil(() => tabletScript.gameState == PuzzleGameState.Win);
closeTabletPrompt.SetActive(true);
yield return new WaitForSeconds(1.0f);
// set prompt on screen to close tablet
closeTabletPrompt.enabled = true;
myDoor.Play(animationFile, 0, 0.0f);
startedPuzzle = false;
// TextPopUp("Press T to Close tablet.");

View File

@ -13,7 +13,7 @@ public class TabletController : MonoBehaviour
[SerializeField] public bool isOnMainMenu = true;
[SerializeField] public TextMeshProUGUI closeTabletPrompt;
[SerializeField] public GameObject closeTabletPrompt;
public bool isShowing = false;
// private bool isMoving = false;
@ -40,7 +40,7 @@ public class TabletController : MonoBehaviour
if (!isShowing)
{
// disable prompt to close tablet
closeTabletPrompt.enabled = false;
// closeTabletPrompt.enabled = false;
TabletAnimator.Play("Tablet_Open");
crosshair.SetActive(false);
// set player motion to 0
@ -58,7 +58,9 @@ public class TabletController : MonoBehaviour
// if is showing play tablet close animation
else
{
closeTabletPrompt.enabled = false;
// closeTabletPrompt.enabled = false;
closeTabletPrompt.SetActive(false);
// disable puzzle canvas
puzzleCanvas.SetActive(false);
// enable main menu canvas

View File

@ -61,7 +61,7 @@ Material:
m_Ints: []
m_Floats: []
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.38857278, g: 0.38857278, b: 0.38857278, a: 1}
- _EmissionColor: {r: 128, g: 128, b: 128, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1