diff options
Diffstat (limited to 'Assets/Scripts/Unit')
-rw-r--r-- | Assets/Scripts/Unit/Events/EventProjectile.cs | 21 | ||||
-rw-r--r-- | Assets/Scripts/Unit/TimelineEventProxy.cs | 4 |
2 files changed, 20 insertions, 5 deletions
diff --git a/Assets/Scripts/Unit/Events/EventProjectile.cs b/Assets/Scripts/Unit/Events/EventProjectile.cs index 0c1dc22b..5f9a22aa 100644 --- a/Assets/Scripts/Unit/Events/EventProjectile.cs +++ b/Assets/Scripts/Unit/Events/EventProjectile.cs @@ -4,6 +4,12 @@ using UnityEngine; public class EventProjectile : AnimationEventBase
{
+ public enum EMoveType
+ {
+ GoStraight,
+ Curve,
+ }
+
public override TimelineEventProxy.EEventType type { get { return TimelineEventProxy.EEventType.EventProjectile; } }
public override string shortName { get { return "P"; } }
@@ -23,18 +29,23 @@ public class EventProjectile : AnimationEventBase [Tooltip("Rotation in euler")]
public Vector3 rotation;
- [Tooltip("Scale")]
+ [When("moveType", EMoveType.GoStraight), Tooltip("Scale")]
public Vector3 scale = Vector3.one;
- [Tooltip("初始速度")]
+ [Comment("[ 运动方式 ]", TextAnchor.MiddleCenter)]
+
+ public EMoveType moveType;
+
+ [When("moveType", EMoveType.GoStraight), Tooltip("初始速度")]
public Vector3 velocity;
- [Tooltip("朝向运动方向")]
public bool towardDirection;
- [Tooltip("击中效果")]
- public ColliderBox.EHitResponse hitResponse;
+ [Comment("[ 击中反馈 ]", TextAnchor.MiddleCenter)]
public string sparkPath;
+ [Tooltip("击中效果")]
+ public ColliderBox.EHitResponse hitResponse;
+
}
diff --git a/Assets/Scripts/Unit/TimelineEventProxy.cs b/Assets/Scripts/Unit/TimelineEventProxy.cs index 7d2231c6..da4185a7 100644 --- a/Assets/Scripts/Unit/TimelineEventProxy.cs +++ b/Assets/Scripts/Unit/TimelineEventProxy.cs @@ -155,6 +155,8 @@ public partial class TimelineEventProxy if (effect == null) return; string path = effect.effectPath; + if (path == null || path == "") + return; GameObject prefab = ResourceManager.Instance.LoadAsset<GameObject>(path); if (prefab != null) { @@ -186,6 +188,8 @@ public partial class TimelineEventProxy if (e == null)
return;
string projectilePath = e.projectilePath;
+ if (projectilePath == null || projectilePath == "")
+ return;
GameObject prefab = ResourceManager.Instance.LoadAsset<GameObject>(projectilePath);
if(prefab == null)
{
|