示例#1
0
        public void SaveTo(string settingsFileName)
        {
            StringBuilder contents = new StringBuilder();

            contents.Append("tileSizeX=");
            contents.AppendLine(TileSizeX.ToString());

            contents.Append("tileSizeY=");
            contents.AppendLine(TileSizeY.ToString());

            contents.Append("inputFile=");
            contents.AppendLine(InputFilePath);

            contents.Append("seed=");
            contents.AppendLine(Seed);

            contents.Append("periodicInputX=");
            contents.AppendLine(PeriodicInputX.ToString());

            contents.Append("periodicInputY=");
            contents.AppendLine(PeriodicInputY.ToString());

            contents.Append("mirrorInput=");
            contents.AppendLine(MirrorInput.ToString());

            contents.Append("rotateInput=");
            contents.AppendLine(RotateInput.ToString());

            File.WriteAllText(Path.Combine(Environment.CurrentDirectory, settingsFileName),
                              contents.ToString());
        }
示例#2
0
    private void DetectRotateInput()
    {
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        if (xInput != 0 || yInput != 0)
        {
            yInput = invertVertical ? -yInput : yInput;

            Vector3 rotation = new Vector3(yInput, xInput, 0);

            RotateInput.Invoke(rotation);
        }
    }
    void DetectRotateInput()
    {
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        if (xInput != 0 || yInput != 0)
        {
            if (invertVertical == true)
            {
                yInput = -yInput;
            }
            Vector3 rotation = new Vector3(yInput, xInput, 0);
            RotateInput?.Invoke(rotation);
        }
    }
示例#4
0
    void DetectRotateInput()
    {
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        if (xInput != 0 || yInput != 0)
        {
            if (_invertVertical == true)
            {
                yInput = -yInput;
            }
        }
        // LR should be y axis and updown is x axis
        Vector3 rotation = new Vector3(yInput, xInput, 0);

        // notify we have rotated
        RotateInput?.Invoke(rotation);
    }
    void DetectRotateInput()
    {
        //get inputs from input controller
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        if (xInput != 0 || yInput != 0)
        {
            //account for inverted camera, if specified
            if (_invertVertical == true)
            {
                yInput = -yInput;
            }
            //mouse left/right should be x axis, up/down should be y
            Vector3 rotation = new Vector3(yInput, xInput, 0);
            //notify that we have rotated
            RotateInput?.Invoke(rotation);
        }
    }
示例#6
0
    void DetectRotateInput()
    {
        //get inputs
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        if (xInput != 0 || yInput != 0)
        {
            //check to see in camera movement is inverted
            if (_invertVertical == true)
            {
                yInput = -yInput;
            }
            //mouse left/right should be y axis, up/down x axis
            Vector3 rotation = new Vector3(yInput, xInput, 0);
            //notify that rotation has occured
            RotateInput?.Invoke(rotation);
        }
    }
示例#7
0
    void DetectRotateInput()
    {
        //get input from controller as a 0 or 1
        float xInput = Input.GetAxisRaw("Mouse X");
        float yInput = Input.GetAxisRaw("Mouse Y");

        //Parse input
        if (xInput != 0 || yInput != 0)
        {
            //check for inverted camera
            if (_invertVertical)
            {
                yInput = -yInput;
            }

            //combine into a single vector
            Vector3 rotation = new Vector3(yInput, xInput, 0);

            //notify rotate
            RotateInput?.Invoke(rotation);
        }
    }