summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Events/EventProjectile.cs
blob: 6083179bd3c23a3b04478f0d7176f32600b4e8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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;

}