/// <summary> /// 攻撃側属性と防御側属性による属性倍率の取得をします /// </summary> /// <param name="attacker"></param> /// <param name="difenser"></param> /// <returns></returns> public static float GetMagnification(MenkoElement attacker, MenkoElement difenser) { int atkIndex = (int)attacker; int difIndex = (int)difenser * (int)MenkoElement.LastIndexer; return(magnif[atkIndex + difIndex] * 0.01f); }
/// <summary> /// 固定ダメージ加算(属性考慮) /// </summary> /// <param name="damage"></param> /// <param name="element"></param> public void SlipDamage(uint damage, MenkoElement element, Vector3 pos) { float elementMagnif = MenkoElementUtils.GetMagnification(element, this.Element); int lastDamage = Mathf.CeilToInt(damage * elementMagnif); Percent += lastDamage; DamageToaster.Instance.ShowDamage(lastDamage, pos); }
public static Effect GetMenkoWeakHitEffect(MenkoElement element) { var path = AssetPath.WeakEffectPath + element.ToString(); var data = AssetManager.Load<Effect>(path); if (!data.IsNull) { return data.Asset as Effect; } return null; }
public static Material GetBackMat(MenkoElement element) { var path = AssetPath.GetMenkoBackMatPath(element); var data = AssetManager.Load<Material>(path); if (!data.IsNull) { return data.Asset as Material; } return null; }
public static Effect GetMenkoWeakHitEffect(MenkoElement element) { var path = AssetPath.WeakEffectPath + element.ToString(); var data = AssetManager.Load <Effect>(path); if (!data.IsNull) { return(data.Asset as Effect); } return(null); }
public static Material GetBackMat(MenkoElement element) { var path = AssetPath.GetMenkoBackMatPath(element); var data = AssetManager.Load <Material>(path); if (!data.IsNull) { return(data.Asset as Material); } return(null); }
/// <summary> /// メンコの裏面マテリアルのパスを取得する /// </summary> /// <returns>The menko back mat path.</returns> /// <param name="element">Element.</param> public static string GetMenkoBackMatPath(MenkoElement element) { switch (element) { case MenkoElement.Flame: return(MenkoBackMatPath + "Flame"); case MenkoElement.Water: return(MenkoBackMatPath + "Water"); case MenkoElement.Leaf: return(MenkoBackMatPath + "Leaf"); case MenkoElement.Light: return(MenkoBackMatPath + "Light"); case MenkoElement.Dark: return(MenkoBackMatPath + "Dark"); default: return(MenkoBackMatPath + "None"); } }
public void SkillDamage(uint damage, MenkoElement element) { data.Status.SlipDamage(damage, element, transform.position); }
/// <summary> /// 固定ダメージ加算(属性考慮) /// </summary> /// <param name="damage"></param> /// <param name="element"></param> public void SlipDamage(uint damage, MenkoElement element, Vector3 pos) { float elementMagnif = MenkoElementUtils.GetMagnification(element, this.Element); int lastDamage = Mathf.CeilToInt(damage * elementMagnif); Percent += lastDamage; DamageToaster.Instance.ShowDamage(lastDamage, pos); }
/// <summary> /// メンコの裏面マテリアルのパスを取得する /// </summary> /// <returns>The menko back mat path.</returns> /// <param name="element">Element.</param> public static string GetMenkoBackMatPath(MenkoElement element) { switch (element) { case MenkoElement.Flame: return MenkoBackMatPath + "Flame"; case MenkoElement.Water: return MenkoBackMatPath + "Water"; case MenkoElement.Leaf: return MenkoBackMatPath + "Leaf"; case MenkoElement.Light: return MenkoBackMatPath + "Light"; case MenkoElement.Dark: return MenkoBackMatPath + "Dark"; default: return MenkoBackMatPath + "None"; } }
public void SkillDamage(uint damage, MenkoElement element) { data.Status.SlipDamage(damage, element, transform.position); }
public MenkoStatus(uint attack, uint difense, MenkoElement element) { this.attack = attack; this.difense = difense; this.element = element; }
public MenkoStatus(uint attack, uint difense, MenkoElement element) { this.attack = attack; this.difense = difense; this.element = element; }
public static Effect GetMenkoAttackEffect(MenkoElement atk, MenkoElement dif) { return GetMenkoHitEffect(atk); }
/// <summary> /// 攻撃側属性と防御側属性による属性倍率の取得をします /// </summary> /// <param name="attacker"></param> /// <param name="difenser"></param> /// <returns></returns> public static float GetMagnification(MenkoElement attacker, MenkoElement difenser) { int atkIndex = (int)attacker; int difIndex = (int)difenser * (int)MenkoElement.LastIndexer; return magnif[atkIndex + difIndex] * 0.01f; }
public static Effect GetMenkoAttackEffect(MenkoElement atk, MenkoElement dif) { return(GetMenkoHitEffect(atk)); }