Beispiel #1
0
 public void HandleDamage(VBuff buff, VBio target, float damage)
 {
     foreach (KeyValuePair <string, VBSBase> kv in this._buffStates)
     {
         kv.Value.OnDamage(buff, target, damage);
     }
 }
Beispiel #2
0
        public void HandleBuffStateAdded(string id, VBuff buff)
        {
            BuffStateData buffStateData = ModelFactory.GetBuffStateData(id);
            VBSBase       buffState     = VBSBase.Create(buffStateData.type);

            buffState.Init(id, buff, this);
            this._buffStates[id] = buffState;
        }
Beispiel #3
0
 public void HandleHurt(VBuff buff, VBio caster, float damage)
 {
     foreach (KeyValuePair <string, VBSBase> kv in this._buffStates)
     {
         kv.Value.OnHurt(buff, caster, damage);
     }
     UIEvent.Hurt(buff, caster, this, damage);
 }
Beispiel #4
0
        protected override void InternalOnRemoveFromBattle()
        {
            this.followedBuff?.RedRef();
            this.followedBuff = null;
            this.followedTarget?.RedRef();
            this.followedTarget = null;

            base.InternalOnRemoveFromBattle();
        }
Beispiel #5
0
        public void HandleTrigger(VBuff buff, int triggerIndex)
        {
            string[] fxss = buff.trigger?.fxs;
            if (fxss == null)
            {
                return;
            }

            int index = fxss.Length - 1;

            index = triggerIndex <= index ? triggerIndex : index;

            string fxId = fxss[index];

            if (!string.IsNullOrEmpty(fxId))
            {
                Effect fx = this.battle.CreateEffect(fxId);
                fx.SetupTerritory(buff.caster, this, Vector3.zero);
            }
        }
Beispiel #6
0
 public void HandleExitBuff(VBuff buff)
 {
 }
Beispiel #7
0
 public void HandleEnterBuff(VBuff buff)
 {
 }