diff options
author | chai <chaifix@163.com> | 2022-04-06 02:50:00 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-06 02:50:00 +0800 |
commit | 680b483c63b02a45d24d6537c9f6c0cdb8e3365b (patch) | |
tree | c0c543e4a84e236471a0ae31678edf89f3a5ac0e /AlienSurvival/Assets/Scripts/Test/TestCannon.cs | |
parent | 109cf871ccd809cc38927a6b068a080ec9fd52a1 (diff) |
*玩法
Diffstat (limited to 'AlienSurvival/Assets/Scripts/Test/TestCannon.cs')
-rw-r--r-- | AlienSurvival/Assets/Scripts/Test/TestCannon.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/AlienSurvival/Assets/Scripts/Test/TestCannon.cs b/AlienSurvival/Assets/Scripts/Test/TestCannon.cs index e68186f..22b168b 100644 --- a/AlienSurvival/Assets/Scripts/Test/TestCannon.cs +++ b/AlienSurvival/Assets/Scripts/Test/TestCannon.cs @@ -17,7 +17,7 @@ public class TestCannon : MonoBehaviour { sprite = GetComponent<SpriteRenderer>(); - StartCoroutine(coFire()); + StartCoroutine(coFire(1f)); } // Update is called once per frame @@ -26,7 +26,7 @@ public class TestCannon : MonoBehaviour } - IEnumerator coFire() + IEnumerator coFire(float interval) { while (true) { @@ -37,7 +37,7 @@ public class TestCannon : MonoBehaviour b.direction = -transform.right; - yield return new WaitForSeconds(0.5f); + yield return new WaitForSeconds(interval); } } |