Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        ui_SlapForce.text       = NewHandManager.GetInstance().touchSlapThrowForce.ToString("F2");
        ui_GrabForce.text       = NewHandManager.GetInstance().touchGrabThrowForce.ToString("F2");
        ui_JuggleThreshold.text = NewBallManager.GetInstance().juggleThreshold.ToString("");
        ui_BallScale.text       = NewBallManager.GetInstance().ballScale.ToString("F2");
        // ui_TimeSlowFactor.text  = TimeManager    .GetInstance(). m_SlowTimeScale    .ToString("F2");
        ui_playcount.text = NewAdManager.playcount.ToString();
        ui_ShowAds.isOn   = !NewAdManager.forceAdsOff;

        bool showDebug = Input.touchCount == 3 || Input.GetKey(KeyCode.D);

        if (showDebug)
        {
            if (canShowMenu)
            {
                canShowMenu   = false;
                showDebugMenu = !showDebugMenu;
            }
        }
        else
        {
            canShowMenu = true;
        }

        debugMenu.SetActive(showDebugMenu);
    }
Beispiel #2
0
    public void AdjustGrabThrowForce(float amt)
    {
        float touchGrabThrowForce = NewHandManager.GetInstance().touchGrabThrowForce;

        touchGrabThrowForce += amt;
        PlayerPrefs.SetFloat("touchGrabForce", touchGrabThrowForce);
        NewHandManager.GetInstance().touchGrabThrowForce = touchGrabThrowForce;

        GlobalSettings.mySettings.grabForce = touchGrabThrowForce;
        GlobalSettings.UpdateSavedValues();
    }
Beispiel #3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         if (this != instance)
         {
             Destroy(gameObject);
         }
     }
 }
Beispiel #4
0
    void InitValues()
    {
        mySettings                 = new GameSettings();
        mySettings.slapForce       = NewHandManager.GetInstance().touchSlapThrowForce;
        mySettings.grabForce       = NewHandManager.GetInstance().touchGrabThrowForce;
        mySettings.juggleThreshold = NewBallManager.GetInstance().juggleThreshold;
        mySettings.ballScale       = NewBallManager.GetInstance().ballScale;
        mySettings.timeScale       = TimeManager.GetInstance().m_SlowTimeScale;
        mySettings.ballSpeedIndex  = NewBallManager.GetInstance().ballSpeedIndex;
        // mySettings.allowSlaps = false;
        mySettings.adsOff = NewAdManager.forceAdsOff;

        UpdateSavedValues();
    }
Beispiel #5
0
    void UpdateInGameValues()
    {
        Debug.Log("SAVED INFO MANAGER: Updating DEVICE's saved settings.");
        mySettings = JsonUtility.FromJson <GameSettings>(jsonString);

        NewHandManager.GetInstance().touchSlapThrowForce = mySettings.slapForce;
        NewHandManager.GetInstance().touchGrabThrowForce = mySettings.grabForce;
        NewBallManager.GetInstance().juggleThreshold     = mySettings.juggleThreshold;
        NewBallManager.GetInstance().ballScale           = mySettings.ballScale;
        TimeManager.GetInstance().m_SlowTimeScale        = mySettings.timeScale;
        NewBallManager.GetInstance().ballSpeedIndex      = mySettings.ballSpeedIndex;
        // NewBallManager.allowSlaps                         = mySettings.allowSlaps;
        NewAdManager.forceAdsOff = mySettings.adsOff;


        UpdateSavedValues();
    }
Beispiel #6
0
    void InitHand()
    {
        m_Transform = transform;

        if (useMouse)
        {
            grabThrowForce = NewHandManager.GetInstance().mouseGrabThrowForce;
            slapThrowForce = NewHandManager.GetInstance().mouseSlapThrowForce;
        }
        else
        {
            grabThrowForce = NewHandManager.GetInstance().touchGrabThrowForce;
            slapThrowForce = NewHandManager.GetInstance().touchSlapThrowForce;
        }

        m_PositionHistory = new List <Vector2>();
        m_CatchRing       = GetComponentInChildren <CatchRing>();
    }
Beispiel #7
0
 public static int GetCurrentFingerIDCount()
 {
     return(NewHandManager.GetInstance().m_FingerIdList.Count);
 }
Beispiel #8
0
 void HandleDeath()
 {
     NewHandManager.GetInstance().RemoveID(m_FingerID);
     Destroy(gameObject);
 }