From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../Scripts/Utils/DemoPrefabController.cs | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 Assets/ThirdParty/MaterializeFX/MaterializationFX/Scripts/Utils/DemoPrefabController.cs (limited to 'Assets/ThirdParty/MaterializeFX/MaterializationFX/Scripts/Utils/DemoPrefabController.cs') diff --git a/Assets/ThirdParty/MaterializeFX/MaterializationFX/Scripts/Utils/DemoPrefabController.cs b/Assets/ThirdParty/MaterializeFX/MaterializationFX/Scripts/Utils/DemoPrefabController.cs deleted file mode 100644 index 73316f82..00000000 --- a/Assets/ThirdParty/MaterializeFX/MaterializationFX/Scripts/Utils/DemoPrefabController.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace MaterializationFX.Scripts.Utils -{ - internal sealed class DemoPrefabController : MonoBehaviour - { - public int StartNum; - public GameObject[] Prefabs; - - private GameObject _currentInstance; - private int _currentPrefabNum; - - public void Next() - { - if (Prefabs.Length == 0) - return; - - _currentPrefabNum++; - if (_currentPrefabNum >= Prefabs.Length) - _currentPrefabNum = 0; - - ChangePrefab(_currentPrefabNum); - } - - private void Start() - { - _currentPrefabNum = StartNum; - - ChangePrefab(_currentPrefabNum); - } - - private void ChangePrefab(int num) - { - if (_currentInstance != null) - Destroy(_currentInstance); - var newPrefab = Prefabs[num]; - _currentInstance = Instantiate(newPrefab, newPrefab.transform.position, newPrefab.transform.transform.rotation); - _currentInstance.SetActive(true); - } - } -} \ No newline at end of file -- cgit v1.1-26-g67d0