summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Avatar/Actions/ActionSetVelocityX.cs
blob: effc3ca7a94233ff92f4efdb9e82d6cf70ab7b38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
	}
}