Esempio n. 1
0
        public static Direction_FB Previous(this Direction_FB val)
        {
            switch (val)
            {
            case FIRST: return(LAST);

            default:    return(--val);
            }
        }
Esempio n. 2
0
        public static Direction_FB Next(this Direction_FB val)
        {
            switch (val)
            {
            case LAST: return(FIRST);

            default:   return(++val);
            }
        }
Esempio n. 3
0
        public static Vector3 EulerAngles(this Direction_FB val)
        {
            switch (val)
            {
            case Direction_FB.Forward:  return(Vector3.left * 90);

            case Direction_FB.Backward: return(Vector3.right * 90);

            default:                    return(Vector3.zero);
            }
        }
Esempio n. 4
0
 public static void Rotate(this Transform transform, Direction_FB dir) => transform.Rotate(dir.EulerAngles());