Exemplo n.º 1
0
    public float bullet_force = 1000f; //force to the bullet


    void Update()
    {
        time_cooler = time_cooler + Time.deltaTime;
        grabPinch.UpdateValues();
        if (grabPinch.lastStateDown && time_cooler > 0.05f)
        {
            time_cooler = 0;
            shooting    = true;
        }

        if (grabPinch.lastStateUp)
        {
            time_cooler = 0;
            shooting    = false;
        }
        if (shooting)
        {
            Shoot();
            m_shootSound.Play();
            shooting = false;
        }
    }