Skip to content

Commit

Permalink
V2.3.4
Browse files Browse the repository at this point in the history
-Text is now displayed for the correct amount of time if FPS higher than 60
  • Loading branch information
Gamer025 committed Apr 10, 2023
1 parent e91e7b3 commit 0390ab8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions RWHUD/CEHUD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,15 @@ public CEHUD(HUD.HUD hud, IEnumerable<CEEvent> activeEvents) : base(hud)
}

}
/// <summary>
/// Used with timeDelta to get consistent execution time
/// </summary>
float timePool = 0;

int timePool = 0;
int displayCounter = 0;
//timeStacker is delatime * 'framesPerSecond' (40)
public override void Draw(float timeStacker)
//Should be called 40 times a second
public override void Update()
{
timePool += timeStacker;
timePool += 1;
//Should run about every 100ms assuming FPS is fine
if (timePool > 3f)
if (timePool >= 4)
{
//Show random event names if selection in progress
if (eventSelection)
Expand All @@ -105,7 +103,7 @@ public override void Draw(float timeStacker)
}

}
timePool -= 4f;
timePool -= 4;
//FPS seem to be really low / game window was froozen, reset timePool
if (timePool > 4f) timePool = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion RainWorldCE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace RainWorldCE;

[BepInPlugin(MOD_ID, "Rain World Chaos Edition", "2.3.3")]
[BepInPlugin(MOD_ID, "Rain World Chaos Edition", "2.3.4")]
public class RainWorldCE : BaseUnityPlugin
{
public const string MOD_ID = "Gamer025.RainworldCE";
Expand Down
2 changes: 1 addition & 1 deletion RainWorldCE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<Version>2.3.3</Version>
<Version>2.3.4</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
2 changes: 1 addition & 1 deletion modinfo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "Gamer025.RainworldCE",
"name": "Rain World: Chaos Edition",
"version": "2.3.3",
"version": "2.3.4",
"target_game_version": "v1.9.06",
"authors": "Gamer025",
"description": "Ever felt like Rain World didn't have enough randomness/chaos? Rain World: Chaos edition is here to help. With over 30 events and the ability to highly customize their generation no cycle will ever be the same.",
Expand Down

0 comments on commit 0390ab8

Please sign in to comment.