summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Inheritance/SGame.cs
diff options
context:
space:
mode:
authorGormogon <Gormogon@users.noreply.github.com>2016-05-29 16:13:24 -0400
committerGormogon <Gormogon@users.noreply.github.com>2016-05-29 16:13:24 -0400
commit625f9c89e4db470c0325b5d148c5286c1b5e54eb (patch)
tree31076fbf57cbbc993abca39eef7bc48762505754 /StardewModdingAPI/Inheritance/SGame.cs
parent9503dfb94b432b1e6e268dc415327eec507a70c2 (diff)
downloadSMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.tar.gz
SMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.tar.bz2
SMAPI-625f9c89e4db470c0325b5d148c5286c1b5e54eb.zip
Take advantage of some new language opportunities.
Diffstat (limited to 'StardewModdingAPI/Inheritance/SGame.cs')
-rw-r--r--StardewModdingAPI/Inheritance/SGame.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs
index 5597e463..9b69434a 100644
--- a/StardewModdingAPI/Inheritance/SGame.cs
+++ b/StardewModdingAPI/Inheritance/SGame.cs
@@ -506,8 +506,7 @@ namespace StardewModdingAPI.Inheritance
//this.checkForEscapeKeys();
updateMusic();
updateRaindropPosition();
- if (bloom != null)
- bloom.tick(gameTime);
+ bloom?.tick(gameTime);
if (globalFade)
{
if (!dialogueUp)
@@ -559,8 +558,7 @@ namespace StardewModdingAPI.Inheritance
if (pauseThenDoFunctionTimer <= 0)
{
freezeControls = false;
- if (afterPause != null)
- afterPause();
+ afterPause?.Invoke();
}
}
if (gameMode == 3 || gameMode == 2)
@@ -657,8 +655,8 @@ namespace StardewModdingAPI.Inheritance
currentMinigame.releaseLeftClick(getMouseX(), getMouseY());
foreach (Buttons b in Utility.getPressedButtons(oldPadState, state3))
currentMinigame.receiveKeyRelease(Utility.mapGamePadButtonToKey(b));
- if (state3.IsConnected && state3.IsButtonDown(Buttons.A) && currentMinigame != null)
- currentMinigame.leftClickHeld(0, 0);
+ if (state3.IsConnected && state3.IsButtonDown(Buttons.A))
+ currentMinigame?.leftClickHeld(0, 0);
}
if (currentMinigame == null)
{
@@ -774,8 +772,7 @@ namespace StardewModdingAPI.Inheritance
if (gameMode == 10)
UpdateOther(gameTime);
}
- if (audioEngine != null)
- audioEngine.Update();
+ audioEngine?.Update();
if (multiplayerMode == 2 && gameMode == 3)
server.sendMessages(gameTime);
}