Exemple #1
0
    /// <summary>
    /// Methode zum prüfen der Inputs für das Kamear zoomen
    /// </summary>
    private void event0()
    {
        //Tastatur Eingabe
        if (Input.GetKey(CameraZoomInKey))
        {
            IInputListener obj = null;
            if (callback.TryGetValue(0, out obj))
            {
                obj.callBack(0, -1);
            }
        }
        if (Input.GetKey(CameraZoomOutKey))
        {
            IInputListener obj = null;
            if (callback.TryGetValue(0, out obj))
            {
                obj.callBack(0, 1);
            }
        }

        //Mausrad prüfung
        if (Input.mouseScrollDelta.y != 0)
        {
            //Es wird versucht ein Listener für das Kamera Zoomen zu erhalten
            IInputListener obj = null;
            if (callback.TryGetValue(0, out obj))
            {
                //Wenn es eine Kamera gibt die sich angemeldet hatt soll für diese Scrollen ausgefüht werden
                obj.callBack(0, (int)Input.mouseScrollDelta.y * (CameraZoomMouseInvert ? 1 : -1));
            }
        }
    }
Exemple #2
0
    /// <summary>
    /// Methode zum prüfen der Inputs für das Kamear Bewegen
    /// </summary>
    private void event2()
    {
        //Tastatur Eingabe
        if (Input.GetKey(CamereRotateLKey))
        {
            IInputListener obj   = null;
            float[]        param = { -1.0f, 0.0f };
            if (callback.TryGetValue(2, out obj))
            {
                obj.callBack(2, param);
            }
        }
        if (Input.GetKey(CamereRotateRKey))
        {
            IInputListener obj   = null;
            float[]        param = { 1.0f, 0.0f };
            if (callback.TryGetValue(2, out obj))
            {
                obj.callBack(2, param);
            }
        }
        if (Input.GetKey(CamereRotateUKey))
        {
            IInputListener obj   = null;
            float[]        param = { 0.0f, 1.0f };
            if (callback.TryGetValue(2, out obj))
            {
                obj.callBack(2, param);
            }
        }
        if (Input.GetKey(CamereRotateDKey))
        {
            IInputListener obj   = null;
            float[]        param = { 0.0f, -1.0f };
            if (callback.TryGetValue(2, out obj))
            {
                obj.callBack(2, param);
            }
        }

        if (Input.GetMouseButton(CameraRotateMouseButton))
        {
            IInputListener obj   = null;
            float[]        param = { mousePositionDelta.x, mousePositionDelta.y };
            if (callback.TryGetValue(2, out obj))
            {
                obj.callBack(2, param);
            }
        }
    }
Exemple #3
0
    /// <summary>
    /// Methode zum prüfen der Inputs für das Kamear Bewegen
    /// </summary>
    private void event1()
    {
        //Tastatur Eingabe
        if (Input.GetKey(CamereMoveLKey))
        {
            IInputListener obj   = null;
            float[]        param = { -1.0f, 0.0f };
            if (callback.TryGetValue(1, out obj))
            {
                obj.callBack(1, param);
            }
        }
        if (Input.GetKey(CamereMoveRKey))
        {
            IInputListener obj   = null;
            float[]        param = { 1.0f, 0.0f };
            if (callback.TryGetValue(1, out obj))
            {
                obj.callBack(1, param);
            }
        }
        if (Input.GetKey(CamereMoveFKey))
        {
            IInputListener obj   = null;
            float[]        param = { 0.0f, 1.0f };
            if (callback.TryGetValue(1, out obj))
            {
                obj.callBack(1, param);
            }
        }
        if (Input.GetKey(CamereMoveBKey))
        {
            IInputListener obj   = null;
            float[]        param = { 0.0f, -1.0f };
            if (callback.TryGetValue(1, out obj))
            {
                obj.callBack(1, param);
            }
        }

        if (Input.GetMouseButton(CameraMoveMouseButton))
        {
            IInputListener obj   = null;
            float[]        param = { mousePositionDelta.x, -mousePositionDelta.y };
            if (callback.TryGetValue(1, out obj))
            {
                obj.callBack(1, param);
            }
        }
    }