summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Tools/Statemachine
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Tools/Statemachine')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Tools/Statemachine/AsyncStatemachine.cs18
-rw-r--r--WorldlineKeepers/Assets/Scripts/Tools/Statemachine/Statemachine.cs8
2 files changed, 13 insertions, 13 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/AsyncStatemachine.cs b/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/AsyncStatemachine.cs
index 605f737..67c791d 100644
--- a/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/AsyncStatemachine.cs
+++ b/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/AsyncStatemachine.cs
@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
-using MEC;
+using MovementEffects;
namespace WK
{
@@ -43,7 +43,7 @@ namespace WK
return NULL_STATE_ID;
if (stateIDDistributor + 1 >= int.MaxValue)
{
- Debug.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£¬´Ë״̬»úÖÐÌí¼ÓµÄ״̬¹ý¶à");
+ LogHelper.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£¬´Ë״̬»úÖÐÌí¼ÓµÄ״̬¹ý¶à");
return NULL_STATE_ID;
}
++stateIDDistributor;
@@ -54,7 +54,7 @@ namespace WK
allState.Add(stateIDDistributor, newState);
return stateIDDistributor;
}
- Debug.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£¬×´Ì¬ÒѾ­´æÔÚ");
+ LogHelper.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£¬×´Ì¬ÒѾ­´æÔÚ");
return NULL_STATE_ID;
}
@@ -64,7 +64,7 @@ namespace WK
{
return RemoveState(state.stateID);
}
- Debug.LogError("״̬»úɾ³ý״̬ʧ°Ü£¬×´Ì¬Îª¿Õ");
+ LogHelper.LogError("״̬»úɾ³ý״̬ʧ°Ü£¬×´Ì¬Îª¿Õ");
return false;
}
@@ -75,7 +75,7 @@ namespace WK
allState.Remove(stateID);
return true;
}
- Debug.LogError("״̬»úɾ³ý״̬ʧ°Ü£¬¸Ã״̬²»´æÔÚ£¬stateID = " + stateID);
+ LogHelper.LogError("״̬»úɾ³ý״̬ʧ°Ü£¬¸Ã״̬²»´æÔÚ£¬stateID = " + stateID);
return false;
}
@@ -147,7 +147,7 @@ namespace WK
{
isUpdateActive = false;
CoroutineHandle handle = Timing.RunCoroutine(EndState(curStateID));
- while (handle.IsValid)
+ while (handle.IsRunning)
{
yield return Timing.WaitForSeconds(COROUINT_DELTIME);
}
@@ -155,7 +155,7 @@ namespace WK
if (!skipStartFunc)
{
CoroutineHandle handle2 = Timing.RunCoroutine(StartState(curStateID));
- while (handle2.IsValid)
+ while (handle2.IsRunning)
{
yield return Timing.WaitForSeconds(COROUINT_DELTIME);
}
@@ -215,7 +215,7 @@ namespace WK
if (state != null)
{
CoroutineHandle handle = Timing.RunCoroutine(state.OnStart());
- while (handle.IsValid)
+ while (handle.IsRunning)
{
yield return Timing.WaitForSeconds(COROUINT_DELTIME);
}
@@ -231,7 +231,7 @@ namespace WK
if (state != null)
{
CoroutineHandle handle = Timing.RunCoroutine(state.OnEnd());
- while (handle.IsValid)
+ while (handle.IsRunning)
{
yield return Timing.WaitForSeconds(COROUINT_DELTIME);
}
diff --git a/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/Statemachine.cs b/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/Statemachine.cs
index 56dd28b..b54b5e1 100644
--- a/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/Statemachine.cs
+++ b/WorldlineKeepers/Assets/Scripts/Tools/Statemachine/Statemachine.cs
@@ -42,7 +42,7 @@ namespace WK
{
if (stateIdDistributor + 1 > int.MaxValue)
{
- Debug.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£ºÒ»¸ö״̬»úÖÐÌí¼ÓÁ˹ý¶àµÄ״̬£¡");
+ LogHelper.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£ºÒ»¸ö״̬»úÖÐÌí¼ÓÁ˹ý¶àµÄ״̬£¡");
return -1;
}
@@ -55,7 +55,7 @@ namespace WK
return stateIdDistributor;
}
}
- Debug.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£ºÎÞЧµÄÐÂ״̬»òÐÂ״̬ÒÑ´æÔÚ£¡");
+ LogHelper.LogError("״̬»úÌí¼Ó״̬ʧ°Ü£ºÎÞЧµÄÐÂ״̬»òÐÂ״̬ÒÑ´æÔÚ£¡");
return -1;
}
@@ -63,7 +63,7 @@ namespace WK
{
if (toBeRemoveState != null)
return RemoveState(toBeRemoveState.stateId);
- Debug.LogError("״̬»úɾ³ý״̬ʧ°Ü£ºÎÞЧµÄ״̬£¡");
+ LogHelper.LogError("״̬»úɾ³ý״̬ʧ°Ü£ºÎÞЧµÄ״̬£¡");
return false;
}
@@ -74,7 +74,7 @@ namespace WK
stateDic.Remove(stateId);
return true;
}
- Debug.LogError("״̬»úɾ³ý״̬ʧ°Ü£º¸Ã״̬²»´æÔÚ£¡");
+ LogHelper.LogError("״̬»úɾ³ý״̬ʧ°Ü£º¸Ã״̬²»´æÔÚ£¡");
return false;
}