public void HandleDamage(VBuff buff, VBio target, float damage) { foreach (KeyValuePair <string, VBSBase> kv in this._buffStates) { kv.Value.OnDamage(buff, target, damage); } }
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; }
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); }
protected override void InternalOnRemoveFromBattle() { this.followedBuff?.RedRef(); this.followedBuff = null; this.followedTarget?.RedRef(); this.followedTarget = null; base.InternalOnRemoveFromBattle(); }
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); } }
public void HandleExitBuff(VBuff buff) { }
public void HandleEnterBuff(VBuff buff) { }