コード例 #1
0
 public void Initialize(Part sourcePart, ConfigurableModule configurableModule)
 {
     if (sourcePart == null || configurableModule == null)
     {
         GameManager.Instance.Log.WriteException(new ArgumentException());
         return;
     }
     _sourcePart = sourcePart;
     if (configurableModule != null)
     {
         _configurableModule  = configurableModule;
         _icon.sprite         = sourcePart.Sprite;
         _sourcePartName.text = sourcePart.Name;
         _effectText.text     = _configurableModule.Name;
         bool partEnabled = _configurableModule.Enabled;
         _toggle.isOn = partEnabled;
     }
 }
コード例 #2
0
        private static void Main(string[] args)
        {
            var module = new ConfigurableModule();

            module.StartModuleAsync(args).Wait();
        }