summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Avatar/HitDefination.cs
blob: d5d68b231ce5bfd9a356bb9afcc73567d5509505 (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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 攻击类型,对应不同的受击者反馈(动作)
/// </summary>
public enum HitType
{
    Light,  // 轻击
    Midium, // 中击
    Heavy,  // 重击
    Ground, // 击倒
    Air,    // 击飞
}

public enum HitSparkHost
{
    Center, // 受击者质心
    Hitpoint, // 重叠盒子中心
    Fixed, // 固定挂点sparkHost
    WorldPosition, // 世界空间位置sparkRotation
}

/// <summary>
/// 一个hit的定义,如果一个attack有多个hit,需要定义多个HitDef
/// </summary>
public class HitDefination
{
    // 触发的开始和结束时间范围,用来处理一个attack多个hit的情况
    public float start = 0f;
	public float end = 1f;

    public HitType type = HitType.Light; // 类型

    // 特效
    public string sparkName = string.Empty; // 特效
    public HitSparkHost sparkHostType = HitSparkHost.Center;
    public Transform sparkHost = null; // 特效挂点
	public Vector3 sparkPosition; // 特效位置
	public Quaternion sparkRotation; // 特效旋转
	public Vector3 sparkScale = Vector3.one; // 特效缩放

    // 相机反馈

    // 攻击方反馈

    // 受击方反馈
    public Vector3 hurtAddForce = Vector3.zero;

}