Esempio n. 1
0
    public virtual void Throw(Vector3 velocity)
    {
        glow.Throwed();
        col.enabled      = true;
        rb.isKinematic   = false;
        rb.velocity      = velocity;
        transform.parent = null;
        bounce.Reset();
        hotness.makeHot();

        rb.AddTorque(Random.Range(-maxTorqueMag, maxTorqueMag));

        AudioManager.instance.PlayClipAtPoint(AudioManager.instance.throwSound, transform.position);
    }