示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KeyCode.LeftShift) ||
            Input.GetKey(KeyCode.RightAlt) ||
            Input.GetKey(KeyCode.LeftAlt))
        {
            globalIKWeight = 0;
            bodyWeight     = 0.1f;
            headWeight     = 0.4f;
        }
        else
        {
            globalIKWeight = 1f;
            bodyWeight     = 1f;
            headWeight     = 1f;
        }

        if (globalIKWeight == 0)
        {
            pWeaponManager.Disarm();
        }
        else
        {
            pWeaponManager.Arm();
        }
    }