void ReceivePlayerControl()
    {
        if (Input.GetKeyDown(KeyCode.G))
        {
            DeployPerform();
        }

        if (Input.GetButton(m_InteractionButtonName))    //Logic problem!!
        {
            ChargePerform();
        }
        else
        {
            m_Charging = false;
        }

        if (Input.GetKeyDown(KeyCode.T))
        {
            if (SmokeReady)
            {
                character.Perform("Smoke", this.gameObject, null);
            }
            else
            {
                if (abilityNotReadyAudio)
                {
                    abilityNotReadyAudio.Play();
                }
            }
        }
    }
示例#2
0
    void ReceivePlayerControl()
    {
        //if (Input.GetKeyDown(KeyCode.G))
        //{
        //    if (HookReady)
        //    {
        //        character.Perform("Hook", gameObject, null);
        //    }
        //}

        if (Input.GetButtonDown("Fire1"))
        {
            if (aiming)
            {
                if (HookReady)
                {
                    character.Perform("Hook", gameObject, null);
                }
                else
                {
                    if (abilityNotReadyAudio)
                    {
                        abilityNotReadyAudio.Play();
                    }
                }
            }
            else if (AttackReady)
            {
                character.Perform("Attack", gameObject, null);
            }
        }

        if (Input.GetKeyDown(KeyCode.T))
        {
            if (WarSenseReady)
            {
                character.Perform("WarSense", gameObject, null);
            }
            else
            {
                if (abilityNotReadyAudio)
                {
                    abilityNotReadyAudio.Play();
                }
            }
        }

        if (Input.GetMouseButton(1))
        {
            if (!aiming)
            {
                if (character.CurrentState == CharacterState.Normal)
                {
                    cameraFx.ActivateAimingPerspective();
                    if (aimLine)
                    {
                        aimLine.enabled = true;
                    }
                    aiming = true;
                }
            }
        }
        else
        {
            if (aiming)
            {
                cameraFx.Deactivate();
                if (aimLine)
                {
                    aimLine.enabled = false;
                }
                aiming = false;
            }
        }
    }