public override void Damage(int value) { TextEffect text = EffectMng.Instance.Pop("TextEffect") as TextEffect; //if (!_hpBar.IsOpen) //_hpBar.Open(); int rand = Random.Range(0, DP + 1); value -= rand; if (value <= 0) { value = 0; text.SetText("막음"); text.CallEvent(_monster.transform.position); return; } mHp -= value; if (mHp <= 0) { MonsterDie(); } else { EffectMng.Instance.Pop("Blood").CallEvent(_monster.transform.position + new Vector3(0.5f, 0.5f)); text.SetText(value.ToString()); text.CallEvent(_monster.transform.position); _hp.UpdateHP(); } }
private void Turn() { if (GameMng.CharMng.GetHero() != null) { //GameMng.Instance.HeroTurnOut(); TurnMng.Instance.HeroTurnOut(); //TurnMng.Instance.HeroTurnOut(); TextEffect effect = EffectMng.Instance.Pop("TextEffect") as TextEffect; effect.Count = 1; effect.SetText("..."); effect.CallEvent(GameMng.CharMng.GetHero().transform.position); } }
public void GetEXP(int exp) { EXP += exp; if (EXP >= MAXEXP) { LevelUp(); } TextEffect effect = EffectMng.Instance.Pop("TextEffect") as TextEffect; effect.SetText("경험치 +" + exp.ToString()); effect.CallEvent(GameMng.CharMng.GetHero().transform.position); UIMng.Instance.CallEvent(UIList.HUD, "UpdateEXP"); }
public override void Damage(int value) { TextEffect effect = EffectMng.Instance.Pop("TextEffect") as TextEffect; // 주사위 굴리기 int min = Armor._enchant; int max = Armor._tear * (2 * Armor._enchant) + 1; int armor = Random.Range(min, max); value -= armor; if (value <= 0) { value = 0; effect.SetText("막음"); effect.CallEvent(GameMng.CharMng.GetHero().transform.position); //_charPopUp.BlockPop(); return; } float prevHP = (float)HP / MAXHP; //UIMng.Instance.CallEvent(UIList.HUD, "DamageUpdateHP", prevHP); HP -= value; UIMng.Instance.CallEvent(UIList.HUD, "UpdateHP"); UIMng.Instance.CallEvent(UIList.HUD, "HPCut", prevHP); effect.SetText(value.ToString()); effect.CallEvent(GameMng.CharMng.GetHero().transform.position + new Vector3(0.5f, 0.5f)); //_charPopUp.DamagePop(value); if (HP <= 0) { Die(); } }
private void LevelUp() { LEVEL++; MAXHP += 5; HP = MAXHP; AP += 1; DP += 1; EXP = 0; MAXEXP += 5; TextEffect effect = EffectMng.Instance.Pop("TextEffect") as TextEffect; effect.SetText("레벨업!"); effect.CallEvent(GameMng.CharMng.GetHero().transform.position); UIMng.Instance.CallEvent(UIList.HUD, "UpdateLevel"); }
public override void MagicDamage(int value) { float prevHP = (float)HP / MAXHP; UIMng.Instance.CallEvent(UIList.HUD, "DamageUpdateHP", prevHP); HP -= value; UIMng.Instance.CallEvent(UIList.HUD, "UpdateHP"); //_charPopUp.DamagePop(value); TextEffect effect = EffectMng.Instance.Pop("TextEffect") as TextEffect; effect.SetText(value.ToString()); effect.CallEvent(GameMng.CharMng.GetHero().transform.position); if (HP <= 0) { Die(); } }