summaryrefslogtreecommitdiff
path: root/Erika/Assets/Scripts/Unit/Events/EventProjectile.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-10 14:07:40 +0800
committerchai <chaifix@163.com>2022-03-10 14:07:40 +0800
commit22891bf59032ba88262824255a706d652031384b (patch)
tree7595439ba9966c9402d37e37cee5e8cf098757d5 /Erika/Assets/Scripts/Unit/Events/EventProjectile.cs
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Erika/Assets/Scripts/Unit/Events/EventProjectile.cs')
-rw-r--r--Erika/Assets/Scripts/Unit/Events/EventProjectile.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/Erika/Assets/Scripts/Unit/Events/EventProjectile.cs b/Erika/Assets/Scripts/Unit/Events/EventProjectile.cs
new file mode 100644
index 00000000..65bf4d29
--- /dev/null
+++ b/Erika/Assets/Scripts/Unit/Events/EventProjectile.cs
@@ -0,0 +1,68 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class EventProjectile : AnimationEventBase
+{
+ public enum EMoveType
+ {
+ Kinematic = 0,
+ Curve, // 用一个固定曲线运动
+ Procedural, // 程序控制
+ }
+
+ public override TimelineEventProxy.EEventType type { get { return TimelineEventProxy.EEventType.EventProjectile; } }
+
+ public override string shortName { get { return "P"; } }
+
+ [Tooltip("名字,可以用来识别这个projectile")]
+ public string name;
+
+ [Tooltip("标签,可以用来做一些标记,逗号分隔")]
+ public string tag;
+
+ [Tooltip("Projectile path")]
+ public string projectilePath;
+
+ [Tooltip("Is attached to a bone")]
+ public bool attachedToBone;
+
+ [If("attachedToBone"), Tooltip("Bone path attach to")]
+ public string bone;
+
+ [Tooltip("Position offset")]
+ public Vector3 posOffset;
+
+ [Tooltip("Rotation in euler")]
+ public Vector3 rotation;
+
+ [Tooltip("Scale")]
+ public Vector3 scale = Vector3.one;
+
+ public float lifeTime;
+
+ [Comment("[ 运动方式 ]", TextAnchor.MiddleCenter)]
+
+ public EMoveType moveType;
+
+ [When("moveType", EMoveType.Kinematic), Tooltip("初始速度")]
+ public Vector3 velocity;
+ [When("moveType", EMoveType.Kinematic), Tooltip("加速度")]
+ public Vector3 acceleration;
+
+ [When("moveType", EMoveType.Curve), Tooltip("运动曲线")]
+ public string curvePath;
+ [When("moveType", EMoveType.Curve), Tooltip("运动速度")]
+ public AnimationCurve speedCurve;
+
+ [WhenNot("moveType", EMoveType.Procedural), Tooltip("forward朝向运动轨迹的方向")]
+ public bool towardDirection;
+
+ [Comment("[ 击中反馈 ]", TextAnchor.MiddleCenter)]
+
+ public string sparkPath;
+
+ [Tooltip("击中效果")]
+ public ColliderBox.EHitResponse hitResponse;
+
+}