From ef739e3c4d66007fb9c2ced195edb539eb92f3a4 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 3 Nov 2020 19:05:55 +0800 Subject: *misc --- .../Avatar/Actions/ActionSetLocalVelocity.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs (limited to 'Assets/Scripts/Avatar/Actions/ActionSetLocalVelocity.cs') 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; + } +} -- cgit v1.1-26-g67d0