// Update is called once per frame void Update() { var pos = Camera.main.WorldToScreenPoint(characer.transform.position + offset); pos = UICamera.list[0].cachedCamera.ScreenToWorldPoint(pos); pos.z = 0; transform.position = pos; hpSprite.fillAmount = characer.GetHp(true); }
private static void DamageApplyCharacterSpeciality(Characer caster, Characer receiver, DamageInfo damgeInfo) { if (caster.special == CharacterSpecialType.HighPercentHpDamageAdd) { if (receiver.GetHp(true) > 0.7f) { damgeInfo.damage *= 1.4f; } } }