Reversed 'KerbalEngineer.Unity.dll' dependancy on 'KerbalEngineer.dll'.
[VesselSimulator.git] / KerbalEngineer / SmoothDisposer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using UnityEngine;
using System;
using Smooth.Dispose;
 
public class SmoothDisposer : MonoBehaviour {
        private static SmoothDisposer instance;
 
        private void Awake() {
                if (instance) {
                        Debug.LogWarning("Only one " + GetType().Name + " should exist at a time, instantiated by the " + typeof(DisposalQueue).Name + " class.");
                        Destroy(this);
                } else {
                        instance = this;
                        DontDestroyOnLoad(this);
                }
        }
        
        private void LateUpdate() {
                DisposalQueue.Pulse();
        }
}