// using System;
//
// using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
//
// using Fort23.Common;
// using Fort23.Core;
// using Fort23.UTool;
//
// #if !COMBAT_SERVER
// using UnityEngine;
// #endif
//
// using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
// using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventLogic;
//
// namespace Common.Combat.FxAILogic
// {
// public class FxAILogicBasic : IDisposable, ITimelineFxLogic
// {
// protected TimeLineEventParticleLogicBasic timeLineEventParticleLogicBasic;
// protected ILifetCycleHitPoint attTarget;
//
// public ILifetCycleHitPoint AttTarget
// {
// get { return attTarget; }
// }
//
// public TimeLineEventParticleLogicBasic TimeLineEventParticleLogicBasic
// {
// get { return timeLineEventParticleLogicBasic; }
// }
// public IGObjectPoolInterface ObjectPoolInterface;
//
// public long InitGuid;
// protected int _updateCount;
//
// protected float _initTime;
//
//
// public bool isPenetrate;
//
//
//
// ///
// /// 开始点
// ///
// protected Vector3 startPos;
//
// public Vector3 CurrPos
// {
// get { return _currPos; }
// }
//
// ///
// /// 当前Obj的位置
// ///
// protected Vector3 _currPos;
//
// protected Vector3 rotation;
//
// protected SpecialDotInfo specialDotInfo;
// protected float currTime;
//
// public TriggerData triggerData;
//
// protected bool isNotCanTriggerGround;
//
// protected bool _isUpdateBasic;
//
// public void Init(Vector3 startPos,
// TimeLineEventParticleLogicBasic timeLineEventParticleLogicBasic, ILifetCycleHitPoint attTarget,
// SpecialDotInfo specialDotInfo = null)
// {
//
// _currPos = startPos;
// this.startPos = startPos;
// this.timeLineEventParticleLogicBasic = timeLineEventParticleLogicBasic;
//
//
// this.attTarget = attTarget;
//
// this.specialDotInfo = specialDotInfo;
// ITimeLineTriggerEvent trigger = timeLineEventParticleLogicBasic.ITimeLineTriggerEntity as ITimeLineTriggerEvent;
// if (trigger != null)
// {
// trigger.TimelineFxLogicInit(timeLineEventParticleLogicBasic.timeLinePlayFxSerializtion.groupName, this,
// triggerData);
// }
//
// _initTime = 0;
// triggerData = timeLineEventParticleLogicBasic.extraData;
// triggerData.TrggerObject = this;
//
// _isUpdateBasic = true;
// ProInit();
// }
//
// public void SetAIMonoObj(IGObjectPoolInterface poolInterface)
// {
// this.ObjectPoolInterface = poolInterface;
// }
//
//
// private void Detection()
// {
// if (_updateCount % 2 != 0)
// {
// return;
// }
//
// ProDetection();
// }
//
// protected virtual void ProDetection()
// {
// }
//
//
//
//
//
// protected void Hit(string fxName, Vector3 startPos, ILifetCycleHitPoint fxTarget, bool isRotate,
// SpecialDotInfo targetSpecialDotInfo)
// {
// if (string.IsNullOrEmpty(fxName))
// {
// return;
// }
//
// CombatFactoryTool.Instance.CreateParticle(fxName, startPos, fxTarget, isRotate,
// targetSpecialDotInfo, delegate(CombatParticleSystemPool pool)
// {
// #if !COMBAT_SERVER
// if (ObjectPoolInterface != null&&pool.own!=null)
// {
// FxColorAlter colorAlter = ObjectPoolInterface.own.GetComponent();
// if (colorAlter != null)
// {
// FxColorAlter colorAlter2 = pool.own.GetComponent();
// if (colorAlter2 == null)
// {
// colorAlter2 = pool.own.AddComponent();
// }
//
// colorAlter2.AlterColor(colorAlter.currValue);
// }
// }
// #endif
// });
// }
//
// public void CombatUpdate(float time)
// {
// if (!_isUpdateBasic)
// {
// return;
// }
//
// _updateCount++;
// _initTime += time;
// ProCombatUpdate(time);
// if (timeLineEventParticleLogicBasic == null)
// {
// return;
// }
//
// Detection();
// if (ObjectPoolInterface != null && !UnityRenderUpdateComponent.Instance.isActive)
// {
// UnityRenderUpdate(time);
// }
// }
//
// public int initLogicFrame { get; set; }
// public int initRenderFrame { get; set; }
//
// public void UnityRenderUpdate(float time)
// {
// ProUnityRenderUpdate(time);
// }
//
// public void UnityRenderUpdateFinish()
// {
// }
//
// public void Dispose()
// {
// if (timeLineEventParticleLogicBasic == null)
// {
// return;
// }
//
// string scName = _fxAiDataBasic.aiScriptName;
// CombatHeroEntity combatHeroEntity = timeLineEventParticleLogicBasic.castEntity.This();
// if (combatHeroEntity != null)
// {
// combatHeroEntity.CombatReportHeroInfo.RemoveRepotLogs(this);
// }
//
// GObjectPool.Instance.Recycle(ObjectPoolInterface);
// CombatFactoryTool.Instance.RemoveFxAILogicBasic(this);
// ProDispose();
// // timeLineEventParticleLogicBasic?.Dispose();
// ObjectPoolInterface = null;
// timeLineEventParticleLogicBasic = null;
// attTarget = null;
// ObjectPoolInterface = null;
// _fxAiDataBasic = null;
// _isUpdateBasic = false;
// UnityRenderUpdateComponent.Instance.RemoveICombatUpdate(this);
// CombatFactoryTool.Instance.Recycle(scName, this);
// }
//
// protected virtual void ProInit()
// {
// }
//
// protected virtual void ProCombatUpdate(float time)
// {
// }
//
// protected virtual void ProUnityRenderUpdate(float time)
// {
// }
//
// protected virtual void ProDispose()
// {
// }
//
//
// public RepotLogInfo CurrFrameRepotLogInfo()
// {
// RepotLogInfo repotLogInfo = new RepotLogInfo();
// repotLogInfo.key = timeLineEventParticleLogicBasic.timeLinePlayFxSerializtion.fxName + InitGuid;
// repotLogInfo.currFrameAlterValue.Add("pos_x", CurrPos.x.m_rawValue);
// repotLogInfo.currFrameAlterValue.Add("pos_y", CurrPos.y.m_rawValue);
// repotLogInfo.currFrameAlterValue.Add("rot_x", rotation.x.m_rawValue);
// repotLogInfo.currFrameAlterValue.Add("rot_y", rotation.y.m_rawValue);
// repotLogInfo.currFrameAlterValue.Add("rot_z", rotation.z.m_rawValue);
//
// return repotLogInfo;
// }
//
//
//
// }
// }