Esempio n. 1
0
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
     LerpMode = AddToggle("Lerp", "lerp_mode", "output as linear interpolation to closest object", false);
 }
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
     maxSpeedSlider          = AddSliderUnclamped("<" + speedSlider.DisplayName, speedSlider.Key + "_2", 0.0f, 0.0f, 250f);
     speedSlider.DisplayName = ">" + speedSlider.DisplayName;
 }
Esempio n. 3
0
 protected void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     BB             = GetComponent <BlockBehaviour>();
     machineHandler = ModContext.GetMachineHandler(BB);
     rigidbody      = GetComponent <Rigidbody>();
     SafeAwake();
 }
Esempio n. 4
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);
 }
        protected override void Awake()
        {
            ModContext     = SingleInstance <Logic> .Instance;
            machineHandler = ModContext.GetMachineHandler(this);
            base.Awake();
            LerpMode = AddToggle("Lerp", "lerp_mode", "output as linear interpolation between selected angles", false);

            if (isSimulating)
            {
                targetDir = base.transform.up;
            }
        }
Esempio n. 6
0
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
     if (MEmulateKey.Text.DisplayName.Length > 8)
     {
         MEmulateKey.Text.DisplayName = "EMU";
     }
     AddText(MActivateKey.Text);
     AddText(MEmulateKey.Text);
     LerpMode = AddToggle("Lerp", "lerp_mode", "output as linear interpolation to closest object", false);
 }
Esempio n. 7
0
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
     if (MEmulateKey.Text.DisplayName.Length > 8)
     {
         MEmulateKey.Text.DisplayName = "EMU";
     }
     AddText(MAKey.Text);
     AddText(MBKey.Text);
     AddText(MEmulateKey.Text);
 }
Esempio n. 8
0
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
     if (MEmulateKey.Text.DisplayName.Length > 8)
     {
         MEmulateKey.Text.DisplayName = "EMU";
     }
     AddText(MActivateKey.Text);
     AddText(MEmulateKey.Text);
     MaxHeigthSlider          = AddSliderUnclamped("<" + heightSlider.DisplayName, heightSlider.Key + "_2", 0.0f, 0.0f, 250f);
     heightSlider.DisplayName = ">" + heightSlider.DisplayName;
 }
Esempio n. 9
0
        protected override void Awake()
        {
            ModContext     = SingleInstance <Logic> .Instance;
            machineHandler = ModContext.GetMachineHandler(this);
            base.Awake();
            if (MEmulateKey.Text.DisplayName.Length > 8)
            {
                MEmulateKey.Text.DisplayName = "EMU";
            }
            AddText(MActivateKey.Text);
            AddText(MEmulateKey.Text);
            LerpMode = AddToggle("Lerp", "lerp_mode", "output as linear interpolation between selected angles", false);

            if (isSimulating)
            {
                targetDir = base.transform.up;
            }
        }
Esempio n. 10
0
        public void AddNewMachine()
        {
            DbConnector conn = new DbConnector();
            string      resp = conn.connect();

            Assert.AreEqual("Done", resp);

            Machine machine = new Machine();

            machine.MachineType   = "Harvester";
            machine.ModelName     = "turbulance400";
            machine.MachineStatus = "Available";
            machine.Price         = 1522.00M;

            MachineHandler mechHandlr = new MachineHandler();
            int            resp2      = mechHandlr.addNewMachine(conn.getConn(), machine);

            Assert.AreEqual(1, resp2);
        }
Esempio n. 11
0
 public SubmitClientInfoJob(NetClient client, MachineHandler machineHandler)
 {
     _client         = client;
     _machineHandler = machineHandler;
 }
Esempio n. 12
0
 protected override void Awake()
 {
     ModContext     = SingleInstance <Logic> .Instance;
     machineHandler = ModContext.GetMachineHandler(this);
     base.Awake();
 }
Esempio n. 13
0
 public MachineService(IUnitOfWork uow, MachineHandler handler)
 {
     _uow     = uow;
     _handler = handler;
 }