예제 #1
0
        public void Start()
        {
            EntryCostManager.FillUpgrades();

            EntryCostDatabase.Initialize();

            EntryCostDatabase.UpdatePartEntryCosts();
        }
예제 #2
0
        public void Start()
        {
            EntryCostManager.FillUpgrades();

            EntryCostDatabase.Initialize();

            EntryCostDatabase.UpdatePartEntryCosts();

            // KSP's Funding binds to the same event and is used for deducting funds for entry purchases.
            // RF will need to bind to the event before KSP itself does to process ECMs right after KSP has updated the funding.
            // Note that KSP fires events in a reverse while loop.
            GameEvents.OnPartPurchased.Add(OnPartPurchased);
        }
예제 #3
0
        public override void OnAwake()
        {
            base.OnAwake();

            if (_instance != null)
            {
                Object.Destroy(this);
                return;
            }
            _instance = this;

            if (configUpgrades == null) // just in case
            {
                FillUpgrades();
            }

            EntryCostDatabase.Initialize(); // should not be needed though.

            GameEvents.OnPartPurchased.Add(new EventData <AvailablePart> .OnEvent(onPartPurchased));
        }