Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        me.MAJ();

        float x = Input.GetAxis("Horizontal");
        float y = Input.GetAxis("Vertical");

        // float x = Input.GetAxis("HorKey");
        // float y = Input.GetAxis("VerKey");

        Vector3 RunningDirection = new Vector3(x, 0, y);

        if (RunningDirection.magnitude > 0.2f)
        {
            me.Activate("Run");
            me.PlayerMove(new Vector3(x, 0, y));
            // CheckPivot(RunningDirection);
            // RotateAroundY(RunningDirection);
        }

        if (Input.GetButtonDown("AButton"))
        {
            me.Activate("Jump");
            me.Jump(JumpDelay);
        }

        if (Input.GetButtonDown("XButton"))
        {
            me.Activate("FootShoot");
        }

        // if(Input.GetButtonDown("YButton"))
        // {
        //  me.Activate("JumpOver");
        // }


        // DebugFunctions();
        // LerpRotation();

        // CheckJumpOver();
    }