Esempio n. 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);
     }
 }
Esempio n. 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;
        }
Esempio n. 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);
 }
Esempio n. 4
0
        protected override void InternalOnRemoveFromBattle()
        {
            this.followedBuff?.RedRef();
            this.followedBuff = null;
            this.followedTarget?.RedRef();
            this.followedTarget = null;

            base.InternalOnRemoveFromBattle();
        }
Esempio n. 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);
            }
        }
Esempio n. 6
0
 public void HandleExitBuff(VBuff buff)
 {
 }
Esempio n. 7
0
 public void HandleEnterBuff(VBuff buff)
 {
 }