コード例 #1
0
 public override void SafeAwake()
 {
     ModContext = SingleInstance <Logic> .Instance;
     Gas        = AddSlider("Gas", "gas", 100.0f, 1.0f, MaxGas);
     Script     = new ScriptText("script", "script");
     BlockBehaviour.AddCustom(Script);
     // DO NOT CALL AddPIO here, because it sends invalid machine state in multiverse after simulation start
     machineHandler = ModContext.GetMachineHandler(BlockBehaviour);
     machineHandler.AddCpuBlock(this);
 }