|
@@ -102,7 +102,6 @@ namespace ET.Client
|
|
|
[FriendOf(typeof(UnitRenderComponet))]
|
|
|
public static class UnitRenerSystem
|
|
|
{
|
|
|
- [ObjectSystem]
|
|
|
public class UnitRenerAwakeSystem : AwakeSystem<UnitRenderComponet, GameObject>
|
|
|
{
|
|
|
protected override void Awake(UnitRenderComponet self, GameObject go)
|
|
@@ -112,14 +111,15 @@ namespace ET.Client
|
|
|
self.AniData = self.GameObject.GetComponent<Mono.AnimationData>();
|
|
|
if (self.AniData != null)
|
|
|
{
|
|
|
+ //TODO: DELETE
|
|
|
self.ExeCommand(UnitRenderComponet.CMDIdle);
|
|
|
}
|
|
|
|
|
|
self.TransHeadInfo = go.transform.Find("BindPart/headInfo");
|
|
|
+ self.FrozenComponent = self.GameObject.GetComponent <Mono.IceFrozen>();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- [ObjectSystem]
|
|
|
public class UnitRenerUpdateSystem : UpdateSystem<UnitRenderComponet>
|
|
|
{
|
|
|
protected override void Update(UnitRenderComponet self)
|
|
@@ -181,6 +181,22 @@ namespace ET.Client
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ public static void PauseAnimation(this UnitRenderComponet self)
|
|
|
+ {
|
|
|
+ self.AniData.Pause();
|
|
|
+ }
|
|
|
+ public static void ResumeAnimation(this UnitRenderComponet self)
|
|
|
+ {
|
|
|
+ self.AniData.Resume();
|
|
|
+ }
|
|
|
+ public static void SetFrozen(this UnitRenderComponet self)
|
|
|
+ {
|
|
|
+ self.FrozenComponent?.StartFroze();
|
|
|
+ }
|
|
|
+ public static void ClearFrozen(this UnitRenderComponet self)
|
|
|
+ {
|
|
|
+ self.FrozenComponent?.ClearFroze();
|
|
|
+ }
|
|
|
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
@@ -197,7 +213,7 @@ namespace ET.Client
|
|
|
{
|
|
|
//Skill动作和实际技能时间不太匹配,切到idle动作
|
|
|
self.AniData.PlayAnimation(cmd.Type, () => {
|
|
|
- if (self.DoingCmd == cmd)
|
|
|
+ if (self.DoingCmd == cmd && !self.AniData.IsPauseStatus())
|
|
|
{
|
|
|
self.ExeCommand(UnitRenderComponet.CMDIdle);
|
|
|
}
|