Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/devedse/LD54
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparkleypie committed Oct 2, 2023
2 parents d66246a + 0c2174d commit 63ed8d5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion UnityGame/Assets/MiniGames/1_Cheezy/MG1.cs
Expand Up @@ -155,7 +155,7 @@ public bool PlayerButtonPress(int player, int button)
//Debug.Log("Player " + player + " won this round");
MinigameManager.Instance.SignalR.GetPlayerByNumber(player).ChangeScore(Mathf.Max(3 - playersFinished, 0));
playersFinished++;
SoundManager.PlaySound(SoundManager.Instance.Sounds.CheesePlayerFinishedStack);
//SoundManager.PlaySound(SoundManager.Instance.Sounds.CheesePlayerFinishedStack);
}
else
{
Expand Down
Expand Up @@ -20,6 +20,7 @@ void Start()
allChildren.Add(child.gameObject);
}
StartCoroutine(GoMoveObjects(allChildren));
SoundManager.PlaySound(SoundManager.Instance.Sounds.ShowTrophiesScene);
}

// Update is called once per frame
Expand Down
10 changes: 8 additions & 2 deletions UnityGame/Assets/Scripts/AwardSceneStuff.cs
Expand Up @@ -64,8 +64,6 @@ private void ChooseCurrentShip()

SoundManager.PlaySound(SoundManager.Instance.Sounds.AwardChooseSlot);

var state = CurrentShipOwnerIndex == Player.PlayerIndex ? FaceType.Happy : FaceType.Mad;
SoundManager.PlaySound(state == FaceType.Happy ? Player.Template.SoundHappy : Player.Template.SoundAngry);

HelpText.text = $"Please choose a slot to place the {RewardInstance.GetComponent<Module>().DisplayName} on!";
var leftMod = ssf.FrontSocket.GetComponent<Module>();
Expand All @@ -88,13 +86,21 @@ private void ChooseCurrentShip()
RightButton.text = $"Place on rear";
}

private IEnumerator DelayPlayerino(FaceType state)
{
yield return new WaitForSeconds(2.5f);
SoundManager.PlaySound(state == FaceType.Happy ? Player.Template.SoundHappy : Player.Template.SoundAngry);
}

public void ApplyToSlot(int slot)
{
var current = MinigameManager.Instance.SignalR.GetPlayerByNumber(CurrentShipOwnerIndex);
current.SetModuleForSlot(slot, RewardPrefab.GetComponent<Module>().ModuleType);
Player.ResetButtonBindings();
StartCoroutine(SwapAndEnd(slot));
SoundManager.PlaySound(SoundManager.Instance.Sounds.AwardChosenAndDone);
var state = CurrentShipOwnerIndex == Player.PlayerIndex ? FaceType.Happy : FaceType.Mad;
StartCoroutine(DelayPlayerino(state));
}

private IEnumerator SwapAndEnd(int slot)
Expand Down
2 changes: 1 addition & 1 deletion UnityGame/Assets/Scripts/Scrobs/Sounds.asset
Expand Up @@ -16,7 +16,7 @@ MonoBehaviour:
JoinedLobby: {fileID: 8300000, guid: f5ef60d6fbf18b84390a63409aecc150, type: 3}
NextGameLoaded: {fileID: 8300000, guid: 5ac3ac75528fcfb45b1baa30c167d66e, type: 3}
FinishCountdown: {fileID: 8300000, guid: 4f012d61a20d3344dac066704165a0d8, type: 3}
FinishGame: {fileID: 8300000, guid: 073afdab08ac19f4abd1dcee53622c04, type: 3}
FinishGame: {fileID: 0}
ShowClaimReward: {fileID: 0}
ShowStats: {fileID: 8300000, guid: 92272f63d97d8ce4fb0c7c9d88ad5104, type: 3}
CheesePlayerFinishedStack: {fileID: 8300000, guid: bb2ef5fb1982bbe4fbc74be65c630980,
Expand Down
1 change: 0 additions & 1 deletion UnityGame/Assets/Scripts/StatsScene.cs
Expand Up @@ -21,7 +21,6 @@ public void Start()
Trophies.Add(CreateTrophyCard(x => x.Stats.MinigameWins, players, "Minigame Master", new Color(108 / 255f, 118 / 255f, 203 / 255f), new Vector3(4, 3.75f, 0)));
Trophies.Add(CreateTrophyCard(x => x.Stats.LastPaces, players, "Participation Award", new Color(246 / 255f, 196 / 255f, 197 / 255f), new Vector3(8, 3.5f, 0)));

SoundManager.PlaySound(SoundManager.Instance.Sounds.ShowTrophiesScene);
}

private void Update()
Expand Down

0 comments on commit 63ed8d5

Please sign in to comment.