This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
#pragma warning disable IDE0041 // Use 'is null' check | |
namespace UnityObjectNullExtensions | |
{ | |
public static class UnityObjectNullExtensionsSafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using HarmonyLib; | |
using Mono.Cecil; | |
using Mono.Cecil.Cil; | |
using Mono.Cecil.Rocks; | |
using MonoMod.Utils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace Utils | |
{ | |
public static class PAWUtils | |
{ | |
///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using Vectrosity; | |
using Camera = UnityEngine.Camera; | |
namespace VectrosityCameraHandler | |
{ | |
[KSPAddon(KSPAddon.Startup.AllGameScenes, false)] | |
[DefaultExecutionOrder(9000)] | |
public class VectrosityCameraHandler : MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[AttributeUsage(AttributeTargets.Field)] | |
public class PartModuleSerializeAttribute : Attribute { } | |
public class SerializablePartModule : PartModule, ISerializationCallbackReceiver | |
{ | |
private static readonly Dictionary<Type, SerializablePartModuleInfo> accessCache = new Dictionary<Type, SerializablePartModuleInfo>(); | |
private static readonly BinaryFormatter bf = new BinaryFormatter(); | |
[SerializeField] private byte[] serializedData; | |
[SerializeField] private int[] offsets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DynamicPAWModule : PartModule | |
{ | |
private DynamicPAWToggle mainToggle; | |
private DynamicPAWToggle auxToggle; | |
private BasePAWGroup group; | |
public override void OnStart(StartState state) | |
{ | |
group = new BasePAWGroup(nameof(DynamicPAWModule), "My Dynamic Module", false); | |
mainToggle = new DynamicPAWToggle(this, UI_Scene.All, group); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A collection of keys mapping times to values, interpolated between keys by a cubic Hermite spline. <para/> | |
/// The implementation produce identical results as a UnityEngine.AnimationCurve, but calling Evaluate() is at least twice faster. <para/> | |
/// However, it doesn't support keys in/out weights, and behavior is always identical to WrapMode.ClampForever. | |
/// </summary> | |
public class FastFloatCurve : IEnumerable<FastFloatCurve.Key>, IConfigNode | |
{ | |
/// <summary> | |
/// Define how a key tangent will be adjusted. | |
/// </summary> |
OlderNewer