From 3ad68338dff5229d3fd8ec9f3ee994d7e37fb0ed Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 2 Sep 2021 09:59:31 +0800 Subject: *override rootmotion --- Assets/Scripts/Unit/TimelineEventProxy.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'Assets/Scripts/Unit/TimelineEventProxy.cs') diff --git a/Assets/Scripts/Unit/TimelineEventProxy.cs b/Assets/Scripts/Unit/TimelineEventProxy.cs index de067455..4a71400c 100644 --- a/Assets/Scripts/Unit/TimelineEventProxy.cs +++ b/Assets/Scripts/Unit/TimelineEventProxy.cs @@ -54,7 +54,8 @@ public partial class TimelineEventProxy EventCamera_Blur, // 相机模糊 EventCamera_WhiteOut, // 相机白屏 - EventMesh_AfterImage, // 角色残像 + EventMesh_AfterImage, // 角色残像 + EventMesh_AfterImageStop, // 角色残像停止事件 EventMesh_FadeIn, // 角色透明度 EventMesh_FadeOut, // 角色透明度 EventMesh_Gloss, // 角色泛光 @@ -79,16 +80,16 @@ public partial class TimelineEventProxy private Transform m_Root; - private UnitController m_Owner; + public UnitController owner { get; private set; } - private UnitAnimation m_UnitAnimation { get { return m_Owner.unitAnimation; } } + private UnitAnimation m_UnitAnimation { get { return owner.unitAnimation; } } private AnimationData m_PrevAnimationData; public TimelineEventProxy(Transform root, UnitController owner = null) { m_Root = root; - m_Owner = owner; + this.owner = owner; m_PrevAnimationData = null; } @@ -200,7 +201,7 @@ public partial class TimelineEventProxy GameObject obj = GameObject.Instantiate(prefab); Projectile projectile = obj.GetComponent(); ProjectileInfo info = new ProjectileInfo(); - info.owner = m_Owner; + info.owner = owner; info.position = m_Root.transform.position + e.posOffset; info.rotation = e.rotation; info.scale = e.scale; @@ -219,6 +220,14 @@ public partial class TimelineEventProxy #endif } - #endregion + void EventMesh_AfterImage(AnimationEventBase animEvent) + { + EventMesh_AfterImage afterImage = animEvent as EventMesh_AfterImage; + if (afterImage == null) + return ; + + } + + #endregion } \ No newline at end of file -- cgit v1.1-26-g67d0