示例#1
0
    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;
            }
        }
    }
示例#2
0
 void OnTapOK(TapTaper tap)
 {
     m_CurTapCount++;
     if (m_CurTapCount >= m_Tapers.Count && DoneHandler != null)
     {
         DoneHandler(this);
     }
 }
示例#3
0
    public void SetTapHero(UnitObject uo)
    {
        TapTaper t = gameObject.GetComponent <TapTaper>();

        if (t != null && uo != null)
        {
            t.TapOnceHandler = uo.OuterTaper;
        }
    }
示例#4
0
    public void RegTapReceiver(TapTaper tap)
    {
        if (m_RegTaps.Contains(tap))
        {
            return;
        }

        m_RegTaps.Add(tap);
    }
示例#5
0
 public void AddTaper(TapTaper t)
 {
     m_Tapers.Add(t);
 }
示例#6
0
 public void UnRegTapReceiver(TapTaper tap)
 {
     m_RegTaps.Remove(tap);
 }
示例#7
0
 private void OnTapFull(TapTaper t)
 {
     this.m_LogicDamage.ExternTapOK();
 }