예제 #1
0
 /// <summary>
 /// Moves a transform by speed, in the forward direction.
 /// </summary>
 public static void Forward(this HUMTransform.Data.Move moveData, float speed, TimeType timeType = TimeType.Delta)
 {
     moveData.transform.position += moveData.transform.forward * (speed * timeType.GetTime());
 }
예제 #2
0
 /// <summary>
 /// Moves a transform left at a specified speed.
 /// </summary>
 public static void Left(this HUMTransform.Data.Move moveData, float speed, TimeType timeType = TimeType.Delta)
 {
     moveData.transform.position -= moveData.transform.right * (speed * timeType.GetTime());
 }