blob: 84a5fcb0a0fa5d32b01519aaef6aa20e706d7cb6 (
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
71
72
73
74
75
76
77
78
79
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 需要受物理系统托管的动作:
// 跳跃上升
// 跳跃下降
// 空中受击
//
//
// 不会受物理系统托管的动作:
// 单个招式
// 空中连击
//
//
// 一般来说启用物理是被动的
/// <summary>
/// 刚体
/// </summary>
public sealed class PhysicsBody : MonoBehaviour
{
[SerializeField]
private Vector3 m_Velocity;
public Vector3 Velocity
{
get
{
return m_Velocity;
}
set
{
m_Velocity = value;
}
}
[SerializeField]
private float m_Weight;
public float Weight
{
get
{
return m_Weight;
}
}
[SerializeField]
private bool m_UseGravity;
public bool UseGravity
{
get
{
return m_UseGravity;
}
set
{
m_UseGravity = value;
}
}
[SerializeField]
private Vector3 m_Accelaration;
public Vector3 Accelaration
{
get
{
return m_Accelaration;
}
}
[Tooltip("摩擦力")]
[SerializeField]
private float m_Frication;
[SerializeField]
private PhysicsPrimitive m_Primitive;
}
|