コード例 #1
0
ファイル: Actor.cs プロジェクト: Doom2fan/PokesYou
 /// <summary>
 /// Changes the actor's pitch (In radians)
 /// </summary>
 /// <param name="x">The value to change the pitch by</param>
 /// <param name="interpolate">If true, the change will be interpolated</param>
 public virtual void ChangePitchRadians(Accum x, bool interpolate = false)
 {
     prevPitch = (interpolate ? pitch : prevPitch);
     pitch     = FixedMath.ClampInt((pitch + FixedMath.RadiansToDegrees(x)), -90, 90);
 }
コード例 #2
0
ファイル: Actor.cs プロジェクト: Doom2fan/PokesYou
 /// <summary>
 /// Changes the actor's angle (In radians)
 /// </summary>
 /// <param name="x">The value to change the angle by</param>
 /// <param name="interpolate">If true, the change will be interpolated</param>
 public virtual void ChangeAngleRadians(Accum x, bool interpolate = false)
 {
     prevAngle = (interpolate ? angle : prevAngle);
     angle     = MathUtils.WrapAngle(angle + FixedMath.RadiansToDegrees(x));
 }