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;
    }
Ejemplo n.º 2
0
 public override void OnTakeDamage(int amount, LVector3 hitPoint)
 {
     uiFloatBar.UpdateHp(entity.curHealth, entity.maxHealth);
     FloatTextManager.CreateFloatText(hitPoint.ToVector3(), -amount);
 }
Ejemplo n.º 3
0
 public virtual void OnTakeDamage(int amount, LVector3 hitPoint)
 {
     FloatTextManager.CreateFloatText(hitPoint.ToVector3(), -amount);
 }
Ejemplo n.º 4
0
    public override void TakeDamage(int amount, string location)
    {
        base.TakeDamage(amount, location);

        FloatTextManager.CreateFloatText(transform, currentDamage);
    }