-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathExample.cs
34 lines (29 loc) · 1.01 KB
/
Example.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using ModularFI;
using UnityEngine;
namespace MyFunMod
{
// this is a really simple example of how to use ModularFlightIntegrator
// This one would replace the drag calculation to remove drag whole
// And make stuff hot
// Obviously you would have to uncomment the lines for it to work.
/*
[KSPAddon(KSPAddon.Startup.SpaceCentre, false)]
class Example : MonoBehaviour
{
public void Awake()
{
Debug.Log("Registering our calls in ModularFlightIntegrator");
ModularFlightIntegrator.RegisterCalculateDragValueOverride(IDontLikeDrag);
ModularFlightIntegrator.RegisterUpdateConvectionOverride(ProcessUpdateConvection);
}
private void ProcessUpdateConvection(ModularFlightIntegrator fi, FlightIntegrator.PartThermalData ptd)
{
ptd.part.temperature = 4000;
}
private static double IDontLikeDrag(ModularFlightIntegrator fi, Part part)
{
return 0;
}
}
*/
}