Skip to content

Commit

Permalink
Merge pull request #19 from techno-dwarf-works/feature/clean-up
Browse files Browse the repository at this point in the history
Version 0.1.12
  • Loading branch information
OpOpYaDev committed May 21, 2024
1 parent ef7f73d commit c6dd5b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Runtime/Modules/StackOverflowModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ public class StackOverflowModule<TState> : SingleModule<TState>
public int MaxDepth { get; private set; }
public bool IsLocked { get; private set; }

public StackOverflowModule(int overflowDepth = DefaultOverflowDepth)
public StackOverflowModule(int overflowDepth)
{
OverflowDepth = overflowDepth;
}

public StackOverflowModule() : this(DefaultOverflowDepth)
{
}

protected void Lock()
{
IsLocked = true;
Expand All @@ -43,7 +47,7 @@ protected internal override void OnStatePreChanged(IStateMachine<TState> stateMa

Depth++;
MaxDepth = Mathf.Max(MaxDepth, Depth);

if (Depth >= OverflowDepth)
{
Lock();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.tdw.better.statemachine",
"displayName": "Better State Machine",
"version": "0.1.11",
"version": "0.1.12",
"unity": "2021.3",
"description": " ",
"dependencies": {
Expand Down

0 comments on commit c6dd5b4

Please sign in to comment.