private void Start()
    {
        _Instance = this;
        if (prefab == null)
        {
            prefab = (GameObject)Resources.Load("Prefabs/FloatingDamage");
        }

        if (config == null)
        {
            config = Resources.Load <FloatTextConfig>("Config/FloatDamageConfig");
        }

        curveAlpha     = config.curveAlpha;
        curveScale     = config.curveScale;
        curveX         = config.curveX;
        curveY         = config.curveY;
        color          = config.color;
        slideTotalTime = config.slideTotalTime;
        yOffset        = config.yOffset;
        xOffset        = config.xOffset;
    }
Esempio n. 2
0
 public override void OnTakeDamage(int amount, LVector3 hitPoint)
 {
     uiFloatBar.UpdateHp(entity.curHealth, entity.maxHealth);
     FloatTextManager.CreateFloatText(hitPoint.ToVector3(), -amount);
 }
 public virtual void OnTakeDamage(int amount, LVector3 hitPoint)
 {
     FloatTextManager.CreateFloatText(hitPoint.ToVector3(), -amount);
 }
Esempio n. 4
0
    public override void TakeDamage(int amount, string location)
    {
        base.TakeDamage(amount, location);

        FloatTextManager.CreateFloatText(transform, currentDamage);
    }