void OnClickUpgradeButton(SKILL_TYPE skillType) { // Upgrade Possible if ((GetRequiredShardsForUpgrade(skillType) <= PlayerManager.Instance().PlayerStatus.CurrentMemoryShards) && (currentGameUIStatus == TOPUI_STATUS.GAMEOVER)) { int requiredShards = GetRequiredShardsForUpgrade(skillType); PlayerManager.Instance().PlayerStatus.CurrentMemoryShards -= requiredShards; GameConfigs.SetCurrentMemoryShards(PlayerManager.Instance().PlayerStatus.CurrentMemoryShards); GameConfigs.SetSkillLevel(skillType, GameConfigs.SkillLevel(skillType) + 1); foreach (UpgradeElement element in upgradeElements) { element.SetInfo(); } int effectShardAmount = (GameConfigs.SkillLevel(skillType) / 3) + 1; if (effectShardAmount < 1) { effectShardAmount = 1; } if (effectShardAmount > 10) { effectShardAmount = 10; } StageLoader.Instance().Generate_SkillUpgradeEffectShards(skillType, effectShardAmount); Vibration.Vibrate(3); StartGlobalLightEffect(Color.white, 1f, 0.2f); SoundManager.PlayOneShotSound(SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_powerUp], SoundContainer.Instance().SoundEffectsDic[GameStatics.sound_powerUp].clip); if (onCameraShake != null) { onCameraShake(2); } } }
public void OnClickSkillCoolLevel() { GameConfigs.SetSkillLevel(GameStatics.SKILL_TYPE.AIRTIME_DURATION, int.Parse(coolSkilllevelString.text)); }
public void OnClickSkillDistanceLevel() { GameConfigs.SetSkillLevel(GameStatics.SKILL_TYPE.SHARD_PULL_DIST, int.Parse(distanceSkillLevelString.text)); }
public void OnClickHPLevel() { GameConfigs.SetSkillLevel(GameStatics.SKILL_TYPE.MAXHP, int.Parse(hpSkillLevelString.text)); }