예제 #1
0
        private void Update()
        {
            bool ctrl = Input.GetKey(KeyCode.LeftControl);
            bool up   = Input.GetKeyDown(KeyCode.UpArrow) ||
                        (Input.GetKey(KeyCode.UpArrow) && ctrl);
            bool down = Input.GetKeyDown(KeyCode.DownArrow) ||
                        (Input.GetKey(KeyCode.DownArrow) && ctrl);
            bool right = Input.GetKeyDown(KeyCode.RightArrow) ||
                         (Input.GetKey(KeyCode.RightArrow) && ctrl);
            bool left = Input.GetKeyDown(KeyCode.LeftArrow) ||
                        (Input.GetKey(KeyCode.LeftArrow) && ctrl);

            if (up)
            {
                debugY = debugY < 0 ? SeaTextureSize - 1 : debugY - 1;
            }
            else if (down)
            {
                debugY = debugY >= SeaTextureSize ? 0 : debugY + 1;
            }
            if (left)
            {
                debugX = debugX < 0 ? SeaTextureSize - 1 : debugX - 1;
            }
            else if (right)
            {
                debugX = debugX >= SeaTextureSize ? 0 : debugX + 1;
            }

            Vector3 pos = MakeSeaRange.GetSphericalPoint(debugX, debugY);

            debugSphere.transform.position = pos * debugSphereRadius;
        }
예제 #2
0
 private void Awake()
 {
     instance = this;
 }