private void CollectReward(BigDouble reward) { if (Type == BlockType.Diamond) { Singleton <FundRunner> .Instance.AddGems(reward.ToInt(), "blockReward", "blocks"); } else if (Type == BlockType.Gold) { Singleton <FundRunner> .Instance.AddCoins(reward); } if (Singleton <EnableObjectsRunner> .Instance == null || Singleton <EnableObjectsRunner> .Instance.GameView.Value) { switch (Type) { case BlockType.Grass: BindingManager.Instance.GrassTarget.SlerpFromWorld(base.transform.position); break; case BlockType.Dirt: BindingManager.Instance.DirtTarget.SlerpFromWorld(base.transform.position); break; case BlockType.Stone: BindingManager.Instance.StoneTarget.SlerpFromWorld(base.transform.position); break; case BlockType.Metal: BindingManager.Instance.MetalTarget.SlerpFromWorld(base.transform.position); break; case BlockType.Wood: BindingManager.Instance.WoodTarget.SlerpFromWorld(base.transform.position); break; case BlockType.Diamond: BindingManager.Instance.UIGemsTarget.SlerpFromWorld(base.transform.position); TextSlerpHelper.SlerpTextBigText(reward, base.transform.position); break; case BlockType.Gold: BindingManager.Instance.CoinsTarget.SlerpFromWorld(base.transform.position); TextSlerpHelper.SlerpTextBigText(reward, base.transform.position); break; } } }
public void CollectRandomReward(Transform start) { spawnedRewards--; int num = rewards.AllotObject(); Vector3 position = start.position; switch (num) { case 0: { BigDouble bigDouble = Singleton <WorldRunner> .Instance.MainBiomeConfig.Value.BlockReward * 100L; Singleton <FundRunner> .Instance.AddCoins(bigDouble); BindingManager.Instance.UICoinsTarget.SlerpFromHud(position); TextSlerpHelper.SlerpUITextBigText(bigDouble, position); break; } case 1: Singleton <FundRunner> .Instance.AddKeys(1, "collectableReward"); BindingManager.Instance.UIKeysTarget.SlerpFromHud(position); TextSlerpHelper.SlerpUITextBigText(new BigDouble(1.0), position); break; case 2: Singleton <FundRunner> .Instance.AddGems(1, "collectableReward", "rewards"); BindingManager.Instance.UIGemsTarget.SlerpFromHud(position); TextSlerpHelper.SlerpUITextBigText(new BigDouble(1.0), position); break; case 3: Singleton <FundRunner> .Instance.AddNormalChests(1, "collectableReward"); BindingManager.Instance.UIChestsTarget.SlerpFromHud(position); break; } }
private void PlayCriticalAnimation() { TextSlerpHelper.SlerpTextCrit("Crit", base.transform.position); BindingManager.Instance.ChunkProgressBar.SetTrigger("CriticalHit"); }