From b82da95b5181ac8bbae38efb13e950d5e88a4caa Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Oct 2020 13:08:43 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8amplify=20shader=20editor=E5=88=B0th?= =?UTF-8?q?ird=20party=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Utils/DemoInputConrtoller.cs | 37 -------------- .../Scripts/Utils/DemoInputConrtoller.cs.meta | 13 ----- .../Scripts/Utils/DemoPrefabController.cs | 41 --------------- .../Scripts/Utils/DemoPrefabController.cs.meta | 13 ----- .../Scripts/Utils/MouseOrbitController.cs | 58 ---------------------- .../Scripts/Utils/MouseOrbitController.cs.meta | 13 ----- 6 files changed, 175 deletions(-) delete mode 100644 Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs delete mode 100644 Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs.meta delete mode 100644 Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs delete mode 100644 Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs.meta delete mode 100644 Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs delete mode 100644 Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs.meta (limited to 'Assets/MaterializeFX/Scripts/Utils') diff --git a/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs b/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs deleted file mode 100644 index f5b2c26f..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEngine; - -namespace Assets.MaterializeFX.Scripts.Utils -{ - internal sealed class DemoInputConrtoller : MonoBehaviour - { - private const string SpaceButton = "space"; - private const string LightButton = "f"; - private DemoPrefabController _demoPrefabController; - - public Light Light; - - public void EnableLigh() - { - Light.enabled = true; - } - - public void DisableLight() - { - Light.enabled = false; - } - - private void Start() - { - _demoPrefabController = GetComponent(); - } - - private void Update() - { - if (Input.GetKeyDown(SpaceButton)) - _demoPrefabController.Next(); - - if (Input.GetKeyDown(LightButton)) - Light.enabled = !Light.enabled; - } - } -} \ No newline at end of file diff --git a/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs.meta b/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs.meta deleted file mode 100644 index 73ac01ca..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/DemoInputConrtoller.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 6a769f5ec192b024985c56e36956f614 -timeCreated: 1504459121 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs b/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs deleted file mode 100644 index d1c108bb..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace Assets.MaterializeFX.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 diff --git a/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs.meta b/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs.meta deleted file mode 100644 index 5f29197f..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/DemoPrefabController.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: b1a784e5c50cf8d4791732b4911f7e65 -timeCreated: 1504459134 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs b/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs deleted file mode 100644 index e2f91048..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs +++ /dev/null @@ -1,58 +0,0 @@ -using UnityEngine; - -namespace Assets.MaterializeFX.Scripts.Utils -{ - internal sealed class MouseOrbitController : MonoBehaviour - { - public Transform Target; - public float Distance = 5.0f; - public float XSpeed = 120.0f; - public float YSpeed = 120.0f; - - public float YMinLimit = 20f; - public float YMaxLimit = 80f; - - public float DistanceMin = .5f; - public float DistanceMax = 15f; - - private float _x; - private float _y; - - private void Start() - { - var angles = transform.eulerAngles; - _x = angles.y; - _y = angles.x; - } - - private void LateUpdate() - { - if (!Input.GetMouseButton(0)) - return; - - _x += Input.GetAxis("Mouse X") * XSpeed * Distance * 0.02f; - _y -= Input.GetAxis("Mouse Y") * YSpeed * 0.02f; - - _y = ClampAngle(_y, YMinLimit, YMaxLimit); - - var rotation = Quaternion.Euler(_y, _x, 0); - - Distance -= Input.GetAxis("Mouse ScrollWheel") * 5; - - var negDistance = new Vector3(0.0f, 0.0f, -Distance); - var position = rotation * negDistance + Target.position; - - transform.rotation = rotation; - transform.position = position; - } - - private static float ClampAngle(float angle, float min, float max) - { - if (angle < -360F) - angle += 360F; - if (angle > 360F) - angle -= 360F; - return Mathf.Clamp(angle, min, max); - } - } -} diff --git a/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs.meta b/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs.meta deleted file mode 100644 index b6ac3ab0..00000000 --- a/Assets/MaterializeFX/Scripts/Utils/MouseOrbitController.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 04f1caafe23156a438ca1d322d70a4ac -timeCreated: 1516131563 -licenseType: Store -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.1-26-g67d0