using System.Collections; using System.Collections.Generic; using Fort23.UTool; using GameLogic.Combat.Hero; using GameTimeLine.CustomizeTimeLogic; using UnityEngine; using Utility; using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface; public class CombatHeroGameObject { public GameObjectPool GameObjectPool; public CombatHeroAnimtion combatHeroAnimtion; public Vector3 position; private CombatHeroEntity _combatHeroEntity; private CombatHeroHitPoint _combatHeroHitPoints = new CombatHeroHitPoint(); public void Init(CombatHeroEntity combatHeroEntity, GameObjectPool gameObjectPool) { _combatHeroEntity = combatHeroEntity; GameObjectPool = gameObjectPool; } public void SetGameObject(GameObjectPool gameObjectPool) { GameObjectPool = gameObjectPool; HitPointMono hitPointMonos = GameObjectPool.own.GetComponentInChildren(true); HitPointMono hitPointMono = hitPointMonos; _combatHeroHitPoints = new CombatHeroHitPoint(); _combatHeroHitPoints.Init(_combatHeroEntity, hitPointMono); SpecialDotMono[] specialDotMonos = GameObjectPool.own.GetComponentsInChildren(true); for (int i = 0; i < specialDotMonos.Length; i++) { SpecialDotMono specialDotMono = specialDotMonos[i]; SpecialDotInfo specialDotInfo = new SpecialDotInfo(); specialDotInfo.dotName = specialDotMono.name; specialDotInfo.targetTran = specialDotMono.transform; specialDotInfo.heroEntity = _combatHeroEntity; // allSpecialDotInfo.Add(specialDotInfo); } } public T GetILifetCycleHitPoint(string hitPoinName, bool isStandType, bool isIgnoreHind) where T : ILifetCycleHitPoint { return (T)(object)_combatHeroHitPoints; } public T GetMainHotPoin(bool isIgnoreHind) where T : ILifetCycleHitPoint { return (T)(object)_combatHeroHitPoints; } }