using System.Collections; using System.Collections.Generic; using UnityEngine; public class ActionSetVelocityX : ActionBase { PhysicsBody m_Body; float m_VelX; public ActionSetVelocityX(PhysicsBody body, float x) { m_Body = body; m_VelX = x; } public override void Execute() { Vector3 v = m_Body.Velocity; v.x = m_VelX; m_Body.Velocity = v; } }