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; [WhenNot("moveType", EMoveType.Procedural)] public bool towardDirection; [Comment("[ 击中反馈 ]", TextAnchor.MiddleCenter)] public string sparkPath; [Tooltip("击中效果")] public ColliderBox.EHitResponse hitResponse; }