private void CreateLine(EntityBase entity) { EntityBase parent; if (this.line == null) { this.line = GameLogic.EffectGet("Effect/Attributes/LifeLine"); this.line.transform.SetParent(GameNode.m_PoolParent.transform); this.mLineCtrl = this.line.GetComponent <LifeLineCtrl>(); this.mLineCtrl.mCacheEvent = new Action(this.CacheEvent); } this.mLineCtrl.UpdateEntity(base.m_Entity, entity); this.hit = MathDxx.CeilToInt(this.attackratio * base.m_Entity.m_EntityData.attribute.AttackValue.ValueCount); entity.m_EntityData.ExcuteBuffs(base.m_Entity, base.BuffID, base.buff_data.Attribute, (float)-this.hit); if (this.m_EntityBaby != null) { parent = this.m_EntityBaby.GetParent(); } else { parent = base.m_Entity; } this.hprecover = MathDxx.CeilToInt(this.hprecoverratio * parent.m_EntityData.attribute.GetHPBase()); parent.m_EntityData.ExcuteBuffs(base.m_Entity, base.BuffID, base.buff_data.Attribute, (float)this.hprecover); }
private void CacheEvent() { this.line = null; this.mLineCtrl = null; }