diff options
Diffstat (limited to 'JamHelper/Assets/JamUtils/Scripts')
48 files changed, 0 insertions, 906 deletions
diff --git a/JamHelper/Assets/JamUtils/Scripts/Character.meta b/JamHelper/Assets/JamUtils/Scripts/Character.meta deleted file mode 100644 index 2ab61ed..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Character.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 33fb2087c14c1bb44aea949d2e0803fc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs b/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs deleted file mode 100644 index 7a82857..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
-}
\ No newline at end of file diff --git a/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs.meta deleted file mode 100644 index 462f5e4..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Character/CameraFollow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 941c680575cd4044891a853d36911609 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Input.meta b/JamHelper/Assets/JamUtils/Scripts/Input.meta deleted file mode 100644 index 0f2e279..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Input.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a89ccbe837e61954eb8db6fd8d8cc6fa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager.meta b/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager.meta deleted file mode 100644 index 478a2fb..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b109ec0d332e7d542933c14195555fc5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs b/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs deleted file mode 100644 index c2f6c26..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- public class LiteInputManager : MonoBehaviour
- {
-
-
- private void Update()
- {
-
- }
-
- }
-
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs.meta deleted file mode 100644 index ea233ec..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Input/LiteInputManager/LiteInputManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 43d60c2791534e944a76fe9bd04611c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Math.meta b/JamHelper/Assets/JamUtils/Scripts/Math.meta deleted file mode 100644 index dee15cb..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ed50ccfb24d775b4dafa806f920fb966 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs b/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs deleted file mode 100644 index befb5d7..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- public class MathUtils
- {
-
-
-
- }
-
-}
\ No newline at end of file diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs.meta deleted file mode 100644 index fb47325..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/MathUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8fdae86a38bbd34b877e4c49185866b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs b/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs deleted file mode 100644 index ad23394..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class Vector2Utils : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs.meta deleted file mode 100644 index baaaadc..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/Vector2Utils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b942375dd102510458322e9b4fed90a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs b/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs deleted file mode 100644 index 11acfe7..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class Vector3Utils : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs.meta deleted file mode 100644 index d0d6741..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Math/Vector3Utils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8720e69e758fe914d8fd09cda9ac1dfa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Network.meta b/JamHelper/Assets/JamUtils/Scripts/Network.meta deleted file mode 100644 index 5d70b8f..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Network.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fbccedc936aea7342b072fc73ccbc9eb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Pathfinding.meta b/JamHelper/Assets/JamUtils/Scripts/Pathfinding.meta deleted file mode 100644 index fdab4ac..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Pathfinding.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3a6eda00318fc0349ae7394b37076a54 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Projectile.meta b/JamHelper/Assets/JamUtils/Scripts/Projectile.meta deleted file mode 100644 index fc0b718..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Projectile.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5f5a1b6c5dc537a4bac6d25da2789a4e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs b/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs deleted file mode 100644 index 772f8eb..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class SphereBullet : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-
- private void OnCollisionEnter(Collision collision)
- {
- }
-
- private void OnCollisionExit(Collision collision)
- {
- // Destroy(this.gameObject);
- }
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs.meta deleted file mode 100644 index 3c7d7a6..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Projectile/SphereBullet.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b04ac7939fcad834eb7f307bc80ecf3b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Props.meta b/JamHelper/Assets/JamUtils/Scripts/Props.meta deleted file mode 100644 index 2c6be10..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Props.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3e5567d87e40a064b9defd283282150c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs b/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs deleted file mode 100644 index 0438b58..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class SliderDoor : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs.meta deleted file mode 100644 index 45b033f..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Props/SliderDoor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4dc113f39388b8d4a8f1fb38cbf5cbd3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity.meta deleted file mode 100644 index 4c9a6c9..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 27aa6a2b9b6bc35439e3d59b7090f631 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs deleted file mode 100644 index efb96f3..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs +++ /dev/null @@ -1,58 +0,0 @@ -using UnityEngine; - -[DisallowMultipleComponent] -[DefaultExecutionOrder(ORDER_EXECUTION)] -public class InterpolationFactorController : MonoBehaviour -{ - public const int ORDER_EXECUTION = -1000; - - private static InterpolationFactorController Instance; - private float[] _lastFixedUpdates = new float[2]; - private int _lastIndex; - - public static float Factor { get; private set; } - - private void Awake() - { - if (Instance) - { - Destroy(this); - Debug.LogWarning($"The '{typeof(InterpolationFactorController).Name}' is a singleton!"); - return; - } - - Instance = this; - Factor = 1; - } - - private void Start() - { - _lastFixedUpdates = new float[2] { Time.fixedTime, Time.fixedTime }; - _lastIndex = 0; - } - - private void FixedUpdate() - { - _lastIndex = NextIndex(); - _lastFixedUpdates[_lastIndex] = Time.fixedTime; - } - - private void Update() - { - float lastTime = _lastFixedUpdates[_lastIndex]; - float prevTime = _lastFixedUpdates[NextIndex()]; - - if (lastTime == prevTime) - { - Factor = 1; - return; - } - - Factor = (Time.time - lastTime) / (lastTime - prevTime); - } - - private int NextIndex() - { - return (_lastIndex == 0) ? 1 : 0; - } -} diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs.meta deleted file mode 100644 index ca7364a..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationFactorController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 63b841e9c9589044db9f0b7edfca90bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: -95 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs deleted file mode 100644 index 3b6c0de..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System;
-using System.Collections; -using UnityEngine; - -[DisallowMultipleComponent] -[DefaultExecutionOrder(ORDER_EXECUTION)] -public class InterpolationObjectController : MonoBehaviour -{
- [Flags]
- public enum InterpolateType
- {
- None,
- Position = 1,
- Rotation = 1 << 1,
- Scale = 1 << 2,
- } - - public InterpolateType type; - - private const int ORDER_EXECUTION = InterpolationFactorController.ORDER_EXECUTION - 1; - - private TransformData[] _transforms; - private int _index; - - private void Awake() - { - StartCoroutine(WaitForEndOfFrame()); - StartCoroutine(WaitForFixedUpdate()); - } - - private void OnEnable() - { - ResetTransforms(); - } - - private void BeforeFixedUpdate() - { - // Restoring actual transform for the FixedUpdate() cal where it could be change by the user. - RestoreActualTransform(); - } - - private void AfterFixedUpdate() - { - // Saving actual transform for being restored in the BeforeFixedUpdate() method. - SaveActualTransform(); - } - - private void Update() - { - // Set interpolated transform for being rendered. - SetInterpolatedTransform(); - } - - #region Helpers - - private void RestoreActualTransform() - { - var latest = _transforms[_index]; - - if((type & InterpolateType.Position) != 0)
- transform.localPosition = latest.position; - if ((type & InterpolateType.Scale) != 0)
- transform.localScale = latest.scale; - if ((type & InterpolateType.Rotation) != 0)
- transform.localRotation = latest.rotation; - } - - private void SaveActualTransform() - { - _index = NextIndex(); - _transforms[_index] = CurrentTransformData(); - } - - private void SetInterpolatedTransform() - { - var prev = _transforms[NextIndex()]; - float factor = InterpolationFactorController.Factor;
- if ((type & InterpolateType.Position) != 0)
- transform.localPosition = Vector3.Lerp(prev.position, transform.localPosition, factor);
- if ((type & InterpolateType.Rotation) != 0)
- transform.localRotation = Quaternion.Slerp(prev.rotation, transform.localRotation, factor);
- if ((type & InterpolateType.Scale) != 0)
- transform.localScale = Vector3.Lerp(prev.scale, transform.localScale, factor); - } - - public void ResetTransforms() - { - _index = 0; - var td = CurrentTransformData(); - _transforms = new TransformData[2] { td, td }; - } - - private TransformData CurrentTransformData() - { - return new TransformData(transform.localPosition, transform.localRotation, transform.localScale); - } - - private int NextIndex() - { - return (_index == 0) ? 1 : 0; - } - - private IEnumerator WaitForEndOfFrame() - { - while (true) - { - yield return new WaitForEndOfFrame(); - BeforeFixedUpdate(); - } - } - - private IEnumerator WaitForFixedUpdate() - { - while (true) - { - yield return new WaitForFixedUpdate(); - AfterFixedUpdate(); - } - } - - private struct TransformData - { - public Vector3 position; - public Quaternion rotation; - public Vector3 scale; - - public TransformData(Vector3 position, Quaternion rotation, Vector3 scale) - { - this.position = position; - this.rotation = rotation; - this.scale = scale; - } - } - - #endregion -} diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs.meta deleted file mode 100644 index 80c49da..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/InterpolationObjectController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 60e373202cc879c4a8e781f92dbdcb48 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: -90 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md deleted file mode 100644 index 016072b..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Smooth Motion in Unity (refactored) - -This is an improved (refactored) version of the code from the ["Timesteps and Achieving Smooth Motion in Unity"](https://www.kinematicsoup.com/news/2016/8/9/rrypp5tkubynjwxhxjzd42s3o034o8?utm_source=youtube&utm_type=SMVideo) article. - -Now, there are only 2 components instead of original 3: - -1. [`InterpolationFactorController`](https://github.com/DevelAx/Smooth-Motion-in-Unity/blob/master/InterpolationFactorController.cs) a singleton scene component (the original name was `InterpolationController`) that calculates the current *interpolation factor*. -2. [`InterpolationObjectController`](https://github.com/DevelAx/Smooth-Motion-in-Unity/blob/master/InterpolationObjectController.cs) a component for a moving object (the original name was `InterpolatedTransform`) which calculates the current interpolation for the object in the `Update()` method before it's being rendered and then restores its original `transform` values for the next `FixedUpdate()` call. -3. The `InterpolatedTransformUpdater` component was removed as unnecessary. - -## Remarks -For these scripts to work correctly the user's script must change the object's `transform` only in the `FixedUpdate()` method. When teleporting the object the user should call the (`InterpolationObjectController`).`ResetTransforms()` method after it. diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md.meta deleted file mode 100644 index b5455ff..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 933a0ade2c59f904c9eed3fb284afb77 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests.meta deleted file mode 100644 index 74a5329..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2255b40400c2ac8469bc94ee99676fb4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs deleted file mode 100644 index 3bf706a..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine; - -/// <summary> -/// Use this component with a game object for demonstration purposes. -/// </summary> -[DisallowMultipleComponent] -[RequireComponent(typeof(InterpolationObjectController))] -public class TestMotion : MonoBehaviour -{ - [SerializeField] - private float _speed = 2f; - - private void FixedUpdate() - { - transform.position += Vector3.right * _speed * Time.fixedDeltaTime; - transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y + _speed * 30 * Time.fixedDeltaTime, transform.rotation.eulerAngles.z); - } -} diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta deleted file mode 100644 index fe06ffe..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80afb4adbb1d67247ac41a23d04b67d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs b/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs deleted file mode 100644 index 87b018f..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class TestCollision : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-
- private void OnCollisionEnter(Collision collision)
- {
- Debug.Log("OnCollisionEnter");
-
- }
-
- private void OnCollisionStay(Collision collision)
- {
-
- }
-
- private void OnCollisionExit(Collision collision)
- {
-
- }
-
-
- private void OnTriggerEnter(Collider other)
- {
- Debug.Log("OnTriggerEnter");
-
- }
-
- private void OnTriggerStay(Collider other)
- {
-
- }
-
- private void OnTriggerExit(Collider other)
- {
- }
-
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs.meta b/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs.meta deleted file mode 100644 index 4d5ff9b..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/TestCollision.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 08a344d0f26d38142afbf1868e8e57b6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/UI.meta b/JamHelper/Assets/JamUtils/Scripts/UI.meta deleted file mode 100644 index 75d543c..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/UI.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 64284bd8573737f478b1adacb050bfae -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs b/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs deleted file mode 100644 index 5df7587..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- //
- public class UIPanelBase : MonoBehaviour
- {
-
- protected void Set()
- {
-
- }
-
- }
-
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs.meta b/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs.meta deleted file mode 100644 index 931e924..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/UI/UIPanelBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e9837ab97fa4d834c8b987cea27424ca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils.meta b/JamHelper/Assets/JamUtils/Scripts/Utils.meta deleted file mode 100644 index 597e961..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 293c2bbf046636f45aa82a0bcde4497c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs b/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs deleted file mode 100644 index 8c8225c..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- public static class ColliderUtility
- {
- private static readonly List<Vector3> s_Vertices = new List<Vector3>();
-
- private static readonly List<int> s_Triangles = new List<int>();
-
- private static Plane GetWorldTriangle(Transform collider, int index)
- {
- Vector3 position = ColliderUtility.s_Vertices[ColliderUtility.s_Triangles[3 * index]];
- Vector3 position2 = ColliderUtility.s_Vertices[ColliderUtility.s_Triangles[3 * index + 1]];
- Vector3 position3 = ColliderUtility.s_Vertices[ColliderUtility.s_Triangles[3 * index + 2]];
- return new Plane(collider.TransformPoint(position), collider.TransformPoint(position2), collider.TransformPoint(position3));
- }
-
- public static Vector3 FindClosestPoint(Collider collider, Vector3 position)
- {
- return ColliderUtility.FindClosestPoint(collider, position, false);
- }
-
- public static Vector3 FindClosestPoint(Collider collider, Vector3 position, bool ignoreVerticalTriangles)
- {
- MeshCollider meshCollider;
- if ((meshCollider = (collider as MeshCollider)) != null && !meshCollider.convex)
- {
- Mesh sharedMesh = meshCollider.sharedMesh;
- sharedMesh.GetVertices(ColliderUtility.s_Vertices);
- Plane plane = default(Plane);
- float num = float.PositiveInfinity;
- for (int i = 0; i < sharedMesh.subMeshCount; i++)
- {
- sharedMesh.GetTriangles(ColliderUtility.s_Triangles, i);
- int j = 0;
- int num2 = ColliderUtility.s_Triangles.Count / 3;
- while (j < num2)
- {
- Plane worldTriangle = ColliderUtility.GetWorldTriangle(meshCollider.transform, j);
- float num3 = Mathf.Abs(worldTriangle.GetDistanceToPoint(position));
- if ((!ignoreVerticalTriangles || (!(worldTriangle.normal == Vector3.up) && !(worldTriangle.normal == Vector3.down))) && ((i == 0 && j == 0) || num3 < num))
- {
- plane = worldTriangle;
- num = num3;
- }
- j++;
- }
- }
- return plane.ClosestPointOnPlane(position);
- }
- return collider.ClosestPoint(position);
- }
- }
-
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs.meta deleted file mode 100644 index 4d828ca..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/ColliderUtility.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 17d16ee713041694bb7486e050909dd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs b/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs deleted file mode 100644 index acef40f..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
- [DefaultExecutionOrder(ORDER_EXECUTION)] - public class CustomExecutionOrder : MonoBehaviour
- {
- private const int ORDER_EXECUTION = -98; -
- static CustomExecutionOrder _instance;
-
- public static CustomExecutionOrder Instance
- {
- get
- {
- if (_instance == null)
- {
- GameObject inst = new GameObject("CustomExecutionOrder");
- inst.hideFlags = HideFlags.DontSave;
- DontDestroyOnLoad(inst);
-
- _instance = inst.AddComponent<CustomExecutionOrder>();
- }
- return _instance;
- }
- }
-
- public event Action beforeFixedUpdate;
- public event Action afterFixedUpdate;
-
- public event Action beforeUpdate;
- public event Action afterUpdate;
-
- private void Awake()
- {
- StartCoroutine(WaitForEndOfFrame());
- StartCoroutine(WaitForFixedUpdate()); - }
-
- private IEnumerator WaitForEndOfFrame()
- {
- while (true)
- {
- yield return new WaitForEndOfFrame();
- if (afterUpdate != null)
- afterUpdate();
- if (beforeFixedUpdate != null)
- beforeFixedUpdate();
- }
- }
-
- private IEnumerator WaitForFixedUpdate()
- {
- while (true)
- {
- yield return new WaitForFixedUpdate();
- if (afterFixedUpdate != null)
- afterFixedUpdate();
- }
- }
-
- private void Update()
- {
- if (beforeUpdate != null)
- beforeUpdate();
- }
-
- }
-}
\ No newline at end of file diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs.meta deleted file mode 100644 index a8e4dfc..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/CustomExecutionOrder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fbaff1c60f455164fbaf0b027c216022 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: -98 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/Editor.meta b/JamHelper/Assets/JamUtils/Scripts/Utils/Editor.meta deleted file mode 100644 index 292ca3d..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0d601d32de9dd74aa29e699ca3bb0ba -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs b/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs deleted file mode 100644 index 1c4c205..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace JamUtils
-{
-
- public class GizmosHandle : MonoBehaviour
- {
- public Action onDrawGizmos;
-
- private static GizmosHandle m_Instance;
-
- public static GizmosHandle Instance
- {
- get
- {
- return m_Instance;
- }
- }
-
- public void DoGizmos(Action doGizmos)
- {
- onDrawGizmos += doGizmos;
- }
-
- private void Awake()
- {
- m_Instance = this;
- }
-
- private void OnDrawGizmos()
- {
- if (onDrawGizmos != null)
- onDrawGizmos();
- onDrawGizmos = null;
- }
-
- }
-
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs.meta deleted file mode 100644 index 43d7e19..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/GizmosHandle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8790b951567cc8942a748fde536a3fe0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs b/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs deleted file mode 100644 index 40fe5bd..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class MeshRendererOrderModifier : MonoBehaviour
-{
- [SerializeField] private string m_RenderLayer;
- [SerializeField] private int m_RenderOrder;
-
- private MeshRenderer m_MeshRenderer;
-
- void Start()
- {
- m_MeshRenderer = GetComponent<MeshRenderer>();
- if(m_MeshRenderer != null)
- {
- m_MeshRenderer.sortingLayerID = SortingLayer.NameToID(m_RenderLayer);
- m_MeshRenderer.sortingOrder = m_RenderOrder;
- }
- }
-}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs.meta deleted file mode 100644 index 18fab3b..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Utils/MeshRendererOrderModifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bbbbac06de34c484daaf3d065f8fe527 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/JamHelper/Assets/JamUtils/Scripts/Vehicles.meta b/JamHelper/Assets/JamUtils/Scripts/Vehicles.meta deleted file mode 100644 index bcc2f75..0000000 --- a/JamHelper/Assets/JamUtils/Scripts/Vehicles.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b04a2ad22c70f9f4ab73013caa31233e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: |