public void Init(InGameLogic.Damage d) { IsOver = false; m_LogicDamage = d; if (m_LogicDamage.Data.fly_able) { m_DamageEffect = CommonUtil.ResourceMng.Instance.GetResource(d.Data.res, CommonUtil.ResourceType.Effect) as GameObject; if (m_DamageEffect == null) { CommonUtil.CommonLogger.LogError("damage res " + d.Data.res + " unexist"); } m_FromPos = GameHelper.Game.FindUnit(d.Attacker).GetSpecialPos(UnitObject.SpecialPosType.FirePos); m_DestPos = GameHelper.Game.FindUnit(d.Receiver).GetSpecialPos(UnitObject.SpecialPosType.HitPos); TapTaper t = m_DamageEffect.GetComponent <TapTaper>(); if (t != null) { t.TapOKCB = this.OnTapFull; t.enabled = true; } } }
void OnTapOK(TapTaper tap) { m_CurTapCount++; if (m_CurTapCount >= m_Tapers.Count && DoneHandler != null) { DoneHandler(this); } }
public void SetTapHero(UnitObject uo) { TapTaper t = gameObject.GetComponent <TapTaper>(); if (t != null && uo != null) { t.TapOnceHandler = uo.OuterTaper; } }
public void RegTapReceiver(TapTaper tap) { if (m_RegTaps.Contains(tap)) { return; } m_RegTaps.Add(tap); }
public void AddTaper(TapTaper t) { m_Tapers.Add(t); }
public void UnRegTapReceiver(TapTaper tap) { m_RegTaps.Remove(tap); }
private void OnTapFull(TapTaper t) { this.m_LogicDamage.ExternTapOK(); }