diff options
author | chai <chaifix@163.com> | 2020-10-23 13:08:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-23 13:08:43 +0800 |
commit | b82da95b5181ac8bbae38efb13e950d5e88a4caa (patch) | |
tree | 48a6f3269276484bbc7cfc95f0651f40a2176aa1 /Assets/MaterializeFX/Scripts/Utils | |
parent | 917e9e0b320775634dc2e710f7deac74fd0822f0 (diff) |
*移动amplify shader editor到third party目录
Diffstat (limited to 'Assets/MaterializeFX/Scripts/Utils')
6 files changed, 0 insertions, 175 deletions
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<DemoPrefabController>();
- }
-
- 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: |