summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs
blob: a6f3730fba4e552293b99b8a1335d51101438aad (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
67
68
69
70
using UnityEngine;

// 打击感相关资料
// https://gameinstitute.qq.com/community/detail/112371
// 

public partial class ColliderBox
{

    public enum EColorDriftMode : int
	{
		None = 0,
		UI = 1,
		All = 2,
	}

	public enum ESparkAnchor : int
	{
		CenterOfIntersection = 0, // hitbox和hurtbox相交的矩形中心
		CenterOfOther = 1, // 被攻击的对象的几何中心
		PositionOfOther = 2, // 被攻击对象的原点
	}

    public enum EMeshEffect : int
    {
        None = 0,
        White = 1,
        Red = 2,
    }

    [ColliderType(EColliderType.HitBox)]

    [Tooltip("击退距离")]
	public Vector3 hitBack;

	[Tooltip("允许多次击中")]
	public bool multiHit;

    [Tooltip("自身钝帧")]
    public float freezeFramesSelf;
    [Tooltip("对方钝帧")]
    public float freezeFramesOther;

    [Foldout("粒子效果", 3)]
    [Tooltip("击中后的粒子效果")]
	public string sparkPath;
	[Tooltip("粒子的锚点")]
	public ESparkAnchor sparkAnchor;
	[Tooltip("击中后的粒子位置偏移")]
	public Vector3 sparkOffset;

    [Foldout("网格效果", 2)]
    public EMeshEffect selfEffect;
    public EMeshEffect otherEffect;

    [Foldout("相机效果", 4)]
	[Tooltip("拉近相机")]
	public bool zoomCamera;
    [Tooltip("是否震屏")]
	public bool shakeScreen;
	[If("shakeScreen"), Tooltip("是否震屏")]
	public Vector2 shakeOffset;
	[If("shakeScreen"), Tooltip("震屏力度")]
	public float shakeStrength;

    [Foldout("屏幕效果", 1)]
    [Tooltip("颜色漂移效果")]
    public EColorDriftMode colorDrift;

}