//GaugeUpdate static private HpGaugePartsProcess GaugeUpdateUpdate(HpGaugePartsProcessState mine, HpGaugeParts hpGaugeParts) { if (hpGaugeParts.GetTimeCounter().measure(Time.deltaTime, hpGaugeParts.GetTimeRegulation())) { //イメージの拡大縮小の処理 t13.UnityUtil.ImageInFluctUpdate( hpGaugeParts.GetGauge(), hpGaugeParts.GetTimeFluct(), hpGaugeParts.GetEndFillAmount(), hpGaugeParts.GetTimeRegulation(), hpGaugeParts.GetTimeRegulation() ); //InfoTextの変更 if (hpGaugeParts.GetInfoText() != null) { Text infoText = hpGaugeParts.GetInfoText(); IMonsterData monsterData = hpGaugeParts.GetReferMonsterData(); int result = (int)t13.Utility.ValueForPercentage( 1, hpGaugeParts.GetEndFillAmount(), monsterData.RealHitPoint() ); infoText.text = t13.Utility.HarfSizeForFullSize(result.ToString()) + "/" + t13.Utility.HarfSizeForFullSize(monsterData.RealHitPoint().ToString()); } //緑 51,238,85,255 //黄 238,209,51 //赤 238,51,53 //Gaugeの色の変更 if (hpGaugeParts.GetGauge().fillAmount < 0.21f) { hpGaugeParts.GetGauge().color = new Color32(238, 51, 53, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } else if (hpGaugeParts.GetGauge().fillAmount < 0.52f) { hpGaugeParts.GetGauge().color = new Color32(238, 209, 51, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } else if (hpGaugeParts.GetGauge().fillAmount < 1.1f) { hpGaugeParts.GetGauge().color = new Color32(51, 238, 85, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } return(HpGaugePartsProcess.None); } else { //イメージの拡大縮小の処理 t13.UnityUtil.ImageInFluctUpdate( hpGaugeParts.GetGauge(), hpGaugeParts.GetTimeFluct(), hpGaugeParts.GetEndFillAmount(), hpGaugeParts.GetTimeCounter().count(), hpGaugeParts.GetTimeRegulation() ); //InfoTextの変更 if (hpGaugeParts.GetInfoText() != null) { Text infoText = hpGaugeParts.GetInfoText(); IMonsterData monsterData = hpGaugeParts.GetReferMonsterData(); int result = (int)t13.Utility.ValueForPercentage( 1, hpGaugeParts.GetGauge().fillAmount, monsterData.RealHitPoint() ); infoText.text = t13.Utility.HarfSizeForFullSize(result.ToString()) + "/" + t13.Utility.HarfSizeForFullSize(monsterData.RealHitPoint().ToString()); } //緑 51,238,85,255 //黄 238,209,51 //赤 238,51,53 //Gaugeの色の変更 if (hpGaugeParts.GetGauge().fillAmount < 0.21f) { hpGaugeParts.GetGauge().color = new Color32(238, 51, 53, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } else if (hpGaugeParts.GetGauge().fillAmount < 0.52f) { hpGaugeParts.GetGauge().color = new Color32(238, 209, 51, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } else if (hpGaugeParts.GetGauge().fillAmount < 1.1f) { hpGaugeParts.GetGauge().color = new Color32(51, 238, 85, (byte)(hpGaugeParts.GetGauge().color.a * 255)); } } return(mine.state_); }
//None static private HpGaugePartsProcess NoneUpdate(HpGaugePartsProcessState mine, HpGaugeParts hpGaugeParts) { return(mine.state_); }