Main/System/Battle/BattleObject/BattleObject.cs
@@ -32,13 +32,13 @@
    public BattleObjectBuffMgr buffMgr;
    public BattleObjectLayerMgr layerMgr;
    public int ObjID { get; set; }
    public BattleCamp Camp { get; protected set; }
    public TeamHero teamHero { get; protected set; }
    // public BuffMgr buffMgr;
    public MotionBase motionBase;
@@ -84,9 +84,11 @@
        Camp = _camp;
        motionBase = new MotionBase();
        motionBase.Init(heroGo.GetComponentInChildren<SkeletonGraphic>(true));
        motionBase.onAnimationComplete += OnAnimationComplete;
        buffMgr = new BattleObjectBuffMgr();
        buffMgr.Init(this);
        layerMgr = new BattleObjectLayerMgr();
        layerMgr.Init(this);
        renderers = heroGo.GetComponentsInChildren<Renderer>(true);
@@ -97,8 +99,9 @@
        var heroInfoBarScale = heroInfoBar.transform.localScale;
        heroInfoBarScale.x *= Camp == BattleCamp.Red ? 1 : -1;
        heroInfoBar.transform.localScale = heroInfoBarScale;
        heroInfoBar.SetActive(true);
        SetFront();
    }
@@ -106,6 +109,7 @@
    {
        motionBase.Run();
        heroInfoBar.Run();
        buffMgr.Run();
    }
    public virtual void Pause()
@@ -120,7 +124,6 @@
    public virtual void Destroy()
    {
        motionBase.onAnimationComplete -= OnAnimationComplete;
        motionBase.Release();
        motionBase = null;
@@ -267,11 +270,13 @@
    public virtual void Hurt(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig)
    {
        PopDamage(damageValues, _totalDamage, hurt, skillConfig);
        BattleDmgInfo dmgInfo = PopDamage(damageValues, _totalDamage, hurt, skillConfig);
        motionBase.PlayAnimation(MotionName.hit, false);
    }
        if (dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage())
        {
            motionBase.PlayAnimation(MotionName.hit, false);
        }
    }
    public void SuckHp(uint suckHP, SkillConfig skillConfig)
    {
@@ -280,7 +285,7 @@
    public void HurtByReflect(uint bounceHP, SkillConfig skillConfig)
    {
    }
    //  闪避开始
@@ -321,16 +326,12 @@
        });
    }
    //  不一定可靠 有时候会插入其他动作就完了
    protected virtual void OnAnimationComplete(string motionName)
    {
    }
    protected virtual void OnDeadAnimationComplete()
    {
        //  或许看看溶解特效? YYL TODO
        heroGo.SetActive(false);
        buffMgr.RemoveAllBuff();
    }
    public void OnReborn(HB423_tagMCTurnFightObjReborn vNetData)
@@ -342,7 +343,7 @@
    }
    // 伤害还要看 是否闪避 暴击 and so on 需要有一个DamageType 服务器应该会给
    protected virtual void PopDamage(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig)
    protected virtual BattleDmgInfo PopDamage(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig)
    {
        BattleDmgInfo battleDmgInfo = new BattleDmgInfo(battleField.guid, damageValues, this, hurt, skillConfig);
@@ -364,6 +365,7 @@
        // YYL TODO 是否需要挂在在自身的follow点上
        EventBroadcast.Instance.Broadcast(EventName.BATTLE_DAMAGE_TAKEN, battleDmgInfo);
        return battleDmgInfo;
    }
    public RectTransform GetAliasTeamNode()
@@ -391,6 +393,7 @@
        heroRectTrans.anchoredPosition = Vector2.zero;
        heroInfoBar.SetActive(false);
        SetFront();
    }
    public void PushDropItems(BattleDrops _battleDrops)
@@ -412,8 +415,20 @@
        battleDrops = null;
    }
    public void SetBack()
    {
        layerMgr.SetBack();
    }
    public void SetFront()
    {
        layerMgr.SetFront();
    }
    public void SetSpeedRatio(float ratio)
    {
        motionBase.SetSpeedRatio(ratio);
    }
#if UNITY_EDITOR_STOP_USING