diff options
author | chai <chaifix@163.com> | 2020-11-03 19:05:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-03 19:05:55 +0800 |
commit | ef739e3c4d66007fb9c2ced195edb539eb92f3a4 (patch) | |
tree | db0605625fe907db4179687a18b36453a15f1a75 /Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs | |
parent | 7afdc099b52be6dbf6f9f8c9e607b3c6cf2b51f7 (diff) |
*misc
Diffstat (limited to 'Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs')
-rw-r--r-- | Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs b/Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs new file mode 100644 index 00000000..5e2f62ed --- /dev/null +++ b/Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ActionSetLocalVelocity : ActionBase +{
+ PhysicsBody m_Body;
+
+ Vector3 m_Velocity;
+
+ public ActionSetLocalVelocity(PhysicsBody body, Vector3 localVelocity)
+ {
+ m_Body = body;
+ m_Velocity = localVelocity;
+ }
+
+ public override void Execute()
+ {
+ m_Body.LocalVelocity = m_Velocity;
+ } +} |