123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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<HitPointMono>(true);
- HitPointMono hitPointMono = hitPointMonos;
- _combatHeroHitPoints = new CombatHeroHitPoint();
- _combatHeroHitPoints.Init(_combatHeroEntity, hitPointMono);
- SpecialDotMono[] specialDotMonos = GameObjectPool.own.GetComponentsInChildren<SpecialDotMono>(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<T>(string hitPoinName, bool isStandType, bool isIgnoreHind)
- where T : ILifetCycleHitPoint
- {
- return (T)(object)_combatHeroHitPoints;
- }
- public T GetMainHotPoin<T>(bool isIgnoreHind) where T : ILifetCycleHitPoint
- {
- return (T)(object)_combatHeroHitPoints;
- }
- }
|