public void AddXp(int i) { experience += i; Refresh(); if (ClimberStateManager.inCampaign) { if (experience == curThreshold - 6) { drop.SpawnForced(PickableItem.Type.LVL, 7, 6); } Persistence.campaignXp = experience; } else if (ClimberStateManager.inTestMode) // in test mode { if (experience == curThreshold - 6) { drop.SpawnForced(PickableItem.Type.LVL, 7, 6); } Persistence.freestyleXp = experience; } else // non campaign live { if (experience == curThreshold) { LvlUp(); } Persistence.freestyleXp = experience; } }
void Start() { dropMgr = FindObjectOfType <DropManager> (); root = new GameObject("StairRoot"); stairs = new List <GameObject> (); int totalSteps = centralStepOffset * 2; for (int i = 0; i < totalSteps; i++) { AddStair(i); // if (dropMgr.enabled) { // if (i > centralStepOffset-1 && i < totalSteps-1) { // //dropMgr.SetStair (stairs [i].transform); // dropMgr.SpawnRandom (stairs [i].transform.position + Vector3.up * bounds.y / 2f, i - (centralStepOffset-1)); // } // } } for (int i = 1; i < centralStepOffset; i++) { dropMgr.SpawnRandom(i); } //Spawn Lock if (FMC_GameDataController.instance != null && !FMC_GameDataController.instance.subscriptionIsActive()) { dropMgr.SpawnForced(PickableItem.Type.LOCK, 6, 6); } //Setcoinorigin (); dropMgr.Reattach(root); }