summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-10-02 09:46:56 +0800
committerchai <chaifix@163.com>2022-10-02 09:46:56 +0800
commita1ad193ee5cd22653d54f237935a9d34b8c146d1 (patch)
tree0fdd33a2ee1534e57fd56a1145031b9fad57e4ea /SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
parent88a6b32e792910e11451da18eb5fb8c103235842 (diff)
+ survival
Diffstat (limited to 'SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs')
-rw-r--r--SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
new file mode 100644
index 0000000..b00f24d
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class TestSnapAngle : MonoBehaviour
+{
+
+ public int m_Count = 16;
+
+ [Range(0, 15)]
+ public int m_Angle;
+
+ public void Update()
+ {
+ transform.rotation = Quaternion.Euler(0,m_Angle * 360f/ m_Count, 0);
+ }
+
+}