示例#1
0
        private void PMReset(ModuleScienceExperiment experi, ShipModel ship)
        {
            //condition to meet before we signal controller
            Func<bool> pollForReset = () => //experi get captured into the delegate
            {
                //wait for module to reset
                if (experi.GetData().Length > 0) { return false; }

                //alert model
                ship.FireScienceEvent();
                return true;
            };

            m_rightClickEvents.Add(pollForReset);
        }