// Automatically run when a game starts void Awake() { Debug.Log(TAG + " first catch is " + firstCatch); GM_INDEX = (int)GAME_MODE; script = transform.parent.GetComponent <playerAnimController>(); score = int.Parse(textScore.text); combo = int.Parse(comboText.text); switch (Application.loadedLevel) { case 3: // Fast Apples gameNum = db.getValue("fa_games"); //AndyUtils.LogDebug(TAG,"Fast Apples games played: " + gameNum); if (gameNum > 0) { firstGame = false; highscore = db.getValue("fa_gamescore"); } break; case 4: // Perfectionist if (StoreInventory.GetGoodUpgradeLevel(AndysApplesAssets.LONGEVITY_GOOD.ItemId) > 4) { lifeCounter = 5; } else { lifeCounter = 3; } timerText.text = lifeCounter.ToString(); timerText.Commit(); gameNum = db.getValue("p_games"); //AndyUtils.LogDebug(TAG,"Perfectionist games played: " + gameNum); if (gameNum > 0) { firstGame = false; highscore = db.getValue("p_gamescore"); } break; } #if UNITY_ANDROID TouchSenseSingleDevice device = new TouchSenseSingleDevice(0); //AndyUtils.LogDebug(TAG, "Device is " + device.name); //AndyUtils.LogDebug(TAG, "Device type is " + device.type.ToString()); Debug.Log(TAG + "Device is " + device.name); Debug.Log(TAG + "Device type is " + device.type.ToString()); if (device == null) { result = false; TouchSense.instance.hapticsEnabled = false; } #endif effectTimer = 5; }
void Awake() { #if UNITY_ANDROID TouchSenseSingleDevice device = new TouchSenseSingleDevice(0); //AndyUtils.LogDebug(TAG, "Device is " + device.name); //AndyUtils.LogDebug(TAG, "Device type is " + device.type.ToString()); Debug.Log(TAG + "Device is " + device.name); Debug.Log(TAG + "Device type is " + device.type.ToString()); if (device == null) { result = false; TouchSense.instance.hapticsEnabled = false; } #endif }
// Automatically run when a game starts void Awake() { Debug.Log(TAG + " first catch is " + firstCatch); GM_INDEX = (int)GAME_MODE; script = transform.parent.GetComponent<playerAnimController>(); score = int.Parse(textScore.text); combo = int.Parse(comboText.text); switch (Application.loadedLevel) { case 3: // Fast Apples gameNum = db.getValue("fa_games"); //AndyUtils.LogDebug(TAG,"Fast Apples games played: " + gameNum); if (gameNum > 0) { firstGame = false; highscore = db.getValue("fa_gamescore"); } break; case 4: // Perfectionist if (StoreInventory.GetGoodUpgradeLevel(AndysApplesAssets.LONGEVITY_GOOD.ItemId) > 4) { lifeCounter = 5; } else { lifeCounter = 3; } timerText.text = lifeCounter.ToString(); timerText.Commit(); gameNum = db.getValue("p_games"); //AndyUtils.LogDebug(TAG,"Perfectionist games played: " + gameNum); if (gameNum > 0) { firstGame = false; highscore = db.getValue("p_gamescore"); } break; } #if UNITY_ANDROID TouchSenseSingleDevice device = new TouchSenseSingleDevice(0); //AndyUtils.LogDebug(TAG, "Device is " + device.name); //AndyUtils.LogDebug(TAG, "Device type is " + device.type.ToString()); Debug.Log(TAG + "Device is " + device.name); Debug.Log(TAG + "Device type is " + device.type.ToString()); if (device == null) { result = false; TouchSense.instance.hapticsEnabled = false; } #endif effectTimer = 5; }