123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System.Collections.Generic;
- using GameTimeLine.CustomizeTimeLogic;
- using UnityEngine;
- using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
- namespace GameLogic.Combat.Hero
- {
- public class CombatHeroHitPoint : ILifetCycleHitPoint
- {
- public List<SpecialDotInfo> allSpecialDotInfo = new List<SpecialDotInfo>();
- public CombatHeroEntity combatHeroEntity;
- public SpecialDotInfo MinSpecialDotInfo;
- public bool IsHide { get; set; }
- public ILifeCycle IfLifeCycle
- {
- get { return combatHeroEntity; }
- }
- public Vector3 Position
- {
- get { return _hitPointMono.transform.position; }
- }
- private HitPointMono _hitPointMono;
- public T This<T>()
- {
- return (T)(object)this;
- }
- public void Init(CombatHeroEntity combatHeroEntity, HitPointMono hitPointMono)
- {
- this.combatHeroEntity = combatHeroEntity;
- _hitPointMono = hitPointMono;
- SpecialDotMono[] specialDotMonos = combatHeroEntity.combatHeroGameObject.GameObjectPool.own
- .GetComponentsInChildren<SpecialDotMono>(true);
- for (int i = 0; i < specialDotMonos.Length; i++)
- {
- SpecialDotMono specialDotMono = specialDotMonos[i];
- SpecialDotInfo specialDotInfo = new SpecialDotInfo();
- specialDotInfo.dotName = specialDotMono.DotName;
- specialDotInfo.targetTran = specialDotMono.transform;
- specialDotInfo.heroEntity = combatHeroEntity;
- allSpecialDotInfo.Add(specialDotInfo);
- }
- MinSpecialDotInfo = new SpecialDotInfo();
- MinSpecialDotInfo.targetTran = combatHeroEntity.combatHeroGameObject.GameObjectPool.own.transform;
- MinSpecialDotInfo.heroEntity = combatHeroEntity;
- }
- public SpecialDotInfo GetSpecialDotInfo(string specialDotName)
- {
- for (int i = 0; i < allSpecialDotInfo.Count; i++)
- {
- if (allSpecialDotInfo[i].dotName == specialDotName)
- {
- return allSpecialDotInfo[i];
- }
- }
- return MinSpecialDotInfo;
- }
- }
- }
|