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

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

/// <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 Transform sparkHost = null; // 特效挂点
	public Vector3 sparkPosition; // 特效位置(sparkHost为空时生效)
	public Quaternion sparkRotation; // 特效旋转
	public Vector3 sparkScale = Vector3.one; // 特效缩放

    // 相机反馈

    // 攻击方反馈

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

}