Skip to content

Commit 1f9343f

Browse files
committed
Merge pull request sirkut#14 from erendrake/develop
Pulling latest changes into my branch.
2 parents 08ba284 + 236dc03 commit 1f9343f

6 files changed

Lines changed: 267 additions & 268 deletions

File tree

InfernalRobotics/InfernalRobotics/Command/Interpolator.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using UnityEngine; // for debug log output
32

43
namespace InfernalRobotics.Command
54
{
@@ -20,21 +19,36 @@ public Interpolator()
2019
CmdPosition = 0f;
2120
}
2221

23-
// dynamic state
22+
#region dynamic state
23+
2424
public float CmdPosition { get; set; }
25+
2526
public float CmdVelocity { get; set; }
27+
2628
public bool Active { get; set; }
29+
2730
public float Position { get; set; }
31+
2832
public float OldPosition { get; set; }
33+
2934
public float Velocity { get; set; }
3035

31-
// config
36+
#endregion dynamic state
37+
38+
#region config
39+
3240
public float MinPosition { get; set; }
41+
3342
public float MaxPosition { get; set; }
43+
3444
public float MaxVelocity { get; set; }
45+
3546
public float MaxAcceleration { get; set; }
47+
3648
public bool IsModulo { get; set; }
3749

50+
#endregion config
51+
3852
public float GetPosition()
3953
{
4054
return ReduceModulo(Position);
@@ -50,7 +64,6 @@ public void SetIncrementalCommand(float cPosDelta, float cVel)
5064

5165
public void SetCommand(float cPos, float cVel)
5266
{
53-
5467
if (cVel != CmdVelocity || cPos != CmdPosition)
5568
{
5669
if (IsModulo)

InfernalRobotics/InfernalRobotics/Effects/SoundSource.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace InfernalRobotics.Effects
55
{
66
/// <summary>
7-
/// credit for sound support goes to the creators of the Kerbal Attachment
7+
/// credit for sound support goes to the creators of the Kerbal Attachment
88
/// </summary>
99
public class SoundSource
1010
{
@@ -57,7 +57,7 @@ public bool Setup(string soundPath, bool loop, float maxDistance = 10f)
5757
motorSound.audio = null;
5858
return false;
5959
}
60-
60+
6161
motorSound.audio = part.gameObject.AddComponent<AudioSource>();
6262
motorSound.audio.volume = GameSettings.SHIP_VOLUME;
6363
motorSound.audio.rolloffMode = AudioRolloffMode.Logarithmic;
@@ -72,9 +72,7 @@ public bool Setup(string soundPath, bool loop, float maxDistance = 10f)
7272
}
7373
catch (Exception ex)
7474
{
75-
7675
Logger.Log(string.Format("SoundSource.Setup() exception {0}", ex.Message), Logger.Level.Fatal);
77-
7876
}
7977
return false;
8078
}
@@ -96,4 +94,4 @@ public void Update(float soundSet, float pitchSet)
9694
motorSound.audio.pitch = pitchSet;
9795
}
9896
}
99-
}
97+
}

0 commit comments

Comments
 (0)