From c6dd5b4f9712a8ddfeb647043a6cad4071ce2954 Mon Sep 17 00:00:00 2001 From: OpOpYaDev Date: Tue, 21 May 2024 21:37:14 +0000 Subject: [PATCH] Merge pull request #19 from techno-dwarf-works/feature/clean-up Version 0.1.12 --- Runtime/Modules/StackOverflowModule.cs | 8 ++++++-- package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Runtime/Modules/StackOverflowModule.cs b/Runtime/Modules/StackOverflowModule.cs index e52e1fb..156fadf 100644 --- a/Runtime/Modules/StackOverflowModule.cs +++ b/Runtime/Modules/StackOverflowModule.cs @@ -16,11 +16,15 @@ public class StackOverflowModule : SingleModule 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; @@ -43,7 +47,7 @@ protected internal override void OnStatePreChanged(IStateMachine stateMa Depth++; MaxDepth = Mathf.Max(MaxDepth, Depth); - + if (Depth >= OverflowDepth) { Lock(); diff --git a/package.json b/package.json index 86f372d..dde5395 100644 --- a/package.json +++ b/package.json @@ -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": {