|
@@ -1,5 +1,8 @@
|
|
|
-using GameLogic.Combat.Hero.HeroGPU;
|
|
|
+using System.Collections.Generic;
|
|
|
+using GameLogic.Combat.Hero.HeroGPU;
|
|
|
+using GameTimeLine.CustomizeTimeLogic;
|
|
|
using GPUECSAnimationBaker.Engine.AnimatorSystem;
|
|
|
+using UnityEngine;
|
|
|
|
|
|
namespace GameLogic.Combat.Hero
|
|
|
{
|
|
@@ -12,10 +15,14 @@ namespace GameLogic.Combat.Hero
|
|
|
private HeroGPUAnimtionStateInfo _heroPlayStateInfoBasic;
|
|
|
|
|
|
protected HeroGPUMono _heroGPUMono;
|
|
|
+ private List<string> _anchorNames = new List<string>();
|
|
|
+
|
|
|
protected override void ProInit()
|
|
|
{
|
|
|
- GpuEcsAnimatorBehaviour = combatHeroEntity.GameObject.transform.GetComponentInChildren<GpuEcsAnimatorBehaviour>();
|
|
|
+ GpuEcsAnimatorBehaviour =
|
|
|
+ combatHeroEntity.GameObject.transform.GetComponentInChildren<GpuEcsAnimatorBehaviour>();
|
|
|
animations = GpuEcsAnimatorBehaviour.animations;
|
|
|
+ _anchorNames = GpuEcsAnimatorBehaviour.anchorNames;
|
|
|
GPUAnimtion = new GPUAnimtion();
|
|
|
GPUAnimtion.Init(GpuEcsAnimatorBehaviour);
|
|
|
_heroPlayStateInfoBasic = new HeroGPUAnimtionStateInfo();
|
|
@@ -28,6 +35,21 @@ namespace GameLogic.Combat.Hero
|
|
|
_heroGPUMono.animtionState = GPUAnimtion.gpuEcsAnimatorShaderData.shaderData;
|
|
|
}
|
|
|
|
|
|
+ public override void SetSpecialDotMonoFollow(SpecialDotInfo specialDotInfo)
|
|
|
+ {
|
|
|
+ if (!specialDotInfo.followSkeleton)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ int index = _anchorNames.IndexOf(specialDotInfo.dotName);
|
|
|
+ if (index >= 0)
|
|
|
+ {
|
|
|
+ GPUAnimtion.GetGPUAnchors(index, out Vector3 pos, out Quaternion unityQuaternion);
|
|
|
+ specialDotInfo.targetTran.localPosition = pos;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private int GetAnimtionIndex(string name)
|
|
|
{
|
|
|
for (int i = 0; i < animations.Length; i++)
|