コード例 #1
0
ファイル: Compass.cs プロジェクト: Mis1eader-dev/Mis1eader
 private void Update()
 {
     if (synchronization)
     {
         angle     = synchronization.angle;
         direction = synchronization.direction;
     }
     else
     {
         angle     = transform.rotation.eulerAngles.y;
         direction = DirectionInstance.GetDirection(angle);
     }
     if (needle)
     {
         if (motion == Motion.Instant)
         {
             needle.localRotation = Quaternion.AngleAxis(angle, axis);
         }
         else if (motion == Motion.Linear)
         {
         }
         else
         {
         }
     }
 }
コード例 #2
0
 private void Update()
 {
     angle     = transform.rotation.eulerAngles.y;
     direction = GetDirection(angle);
 }