diff options
Diffstat (limited to 'StardewModdingAPI/Inheritance/SGame.cs')
-rw-r--r-- | StardewModdingAPI/Inheritance/SGame.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs index 9082d695..53d9df59 100644 --- a/StardewModdingAPI/Inheritance/SGame.cs +++ b/StardewModdingAPI/Inheritance/SGame.cs @@ -174,6 +174,13 @@ namespace StardewModdingAPI.Inheritance public Farmer PreviousFarmer { get; private set; }
public Int32 CurrentUpdateTick { get; private set; }
+ public bool FirstUpdate { get; private set; }
+
+ public RenderTarget2D Screen
+ {
+ get { return typeof (Game1).GetBaseFieldValue<RenderTarget2D>(Program.gamePtr, "screen"); }
+ set { typeof (Game1).SetBaseFieldValue("screen", value); }
+ }
private static SGame instance;
public static SGame Instance { get { return instance; } }
@@ -183,6 +190,7 @@ namespace StardewModdingAPI.Inheritance public SGame()
{
instance = this;
+ FirstUpdate = true;
/*
#if DEBUG
@@ -255,6 +263,11 @@ namespace StardewModdingAPI.Inheritance }
Events.GameEvents.InvokeUpdateTick();
+ if (FirstUpdate)
+ {
+ GameEvents.InvokeFirstUpdateTick();
+ FirstUpdate = false;
+ }
if (CurrentUpdateTick % 2 == 0)
Events.GameEvents.InvokeSecondUpdateTick();
@@ -278,7 +291,6 @@ namespace StardewModdingAPI.Inheritance if (CurrentUpdateTick >= 60)
CurrentUpdateTick = 0;
-
PreviouslyPressedKeys = CurrentlyPressedKeys;
for(PlayerIndex i = PlayerIndex.One; i <= PlayerIndex.Four; i++)
{
|