// 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); }
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(); }
void Awake() { if (instance == null) { instance = this; } else { if (this != instance) { Destroy(gameObject); } } }
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(); }
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(); }
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>(); }
public static int GetCurrentFingerIDCount() { return(NewHandManager.GetInstance().m_FingerIdList.Count); }
void HandleDeath() { NewHandManager.GetInstance().RemoveID(m_FingerID); Destroy(gameObject); }