diff --git a/Assets/Scenes/SubWay.unity b/Assets/Scenes/SubWay.unity index fc661bca4..68659813e 100644 --- a/Assets/Scenes/SubWay.unity +++ b/Assets/Scenes/SubWay.unity @@ -3324,7 +3324,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: initOnAwake: 0 - defaultTime: 1 + defaultTime: 0 defaultWeather: 0 --- !u!4 &1929645612 Transform: diff --git a/Assets/Scripts/SceneManagement/SpawnerKit/Spawner.cs b/Assets/Scripts/SceneManagement/SpawnerKit/Spawner.cs index af51d69aa..564dc4285 100644 --- a/Assets/Scripts/SceneManagement/SpawnerKit/Spawner.cs +++ b/Assets/Scripts/SceneManagement/SpawnerKit/Spawner.cs @@ -27,6 +27,8 @@ namespace AibisDream protected float curInterval; protected float targetInterval; + protected bool isSpawning; + private void Awake() { if (playOnAwake) @@ -67,6 +69,7 @@ namespace AibisDream default: throw new ArgumentOutOfRangeException(); } + isSpawning = true; } protected virtual ISelector CreateSelector(IEnumerable datas) @@ -110,7 +113,10 @@ namespace AibisDream private void Update() { - OnUpdate(); + if (isSpawning) + { + OnUpdate(); + } } protected virtual void OnUpdate() diff --git a/Assets/interval_randomization.cs b/Assets/interval_randomization.cs deleted file mode 100644 index 3fe1867b5..000000000 --- a/Assets/interval_randomization.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace AibisDream -{ - public class interval_randomization : StateMachineBehaviour - { - // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state - //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // - //} - - // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks - //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // - //} - - // OnStateExit is called when a transition ends and the state machine finishes evaluating this state - //override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // - //} - - // OnStateMove is called right after Animator.OnAnimatorMove() - //override public void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // // Implement code that processes and affects root motion - //} - - // OnStateIK is called right after Animator.OnAnimatorIK() - //override public void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // // Implement code that sets up animation IK (inverse kinematics) - //} - } -} diff --git a/Assets/interval_randomization.cs.meta b/Assets/interval_randomization.cs.meta deleted file mode 100644 index a40830616..000000000 --- a/Assets/interval_randomization.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fa45459b4dee1d9419da0d740064d2ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: