Beispiel #1
0
    void ThrowMoney(float angle, float distance)
    {
        tmpCash = PoolManager.Inst.CreateCash(throwSpawnPos.position);
        Vector3 dir        = Quaternion.AngleAxis(angle, Vector3.forward) * Vector3.right;
        float   throwForce = (force / dragTime) * (distance * distanceFactor) * GameConfiguration.GetInstance().mouseSensivity;

        tmpCash.GetComponent <Rigidbody>().AddForce(dir * throwForce);
        tmpCash.GetComponent <Rigidbody>().AddTorque(new Vector3(Random.Range(-1000, 1000), Random.Range(-1000, 1000), Random.Range(-1000, 1000)));
        SoundManager.inst.PlaySFXOneShot(5);
    }
 public void SetSensitivity()
 {
     GameConfiguration.GetInstance().mouseSensivity = slider.value;
 }
 public void Restart()
 {
     GameConfiguration.GetInstance().mouseSensivity = 1;
     GameSceneManager.GetInstance().ReturnToWelcome();
 }
 void Start()
 {
     slider.value = GameConfiguration.GetInstance().mouseSensivity;
 }