ProcessElectricity() private method

private ProcessElectricity ( Part part, float time ) : void
part Part
time float
return void
Exemplo n.º 1
0
        public void Update()
        {
            if (part.State == PartStates.DEAD)
            {
                cpu.Mode = CPU.Modes.OFF;
                return;
            }

            cpu.Update(Time.deltaTime);

            cpu.ProcessElectricity(this.part, TimeWarp.fixedDeltaTime);

            UpdateParts();
        }
Exemplo n.º 2
0
        public void Update()
        {
            if (cpu == null)
            {
                return;
            }

            Events["TogglePowerOn"].active  = Events["TogglePowerOn"].guiActiveUnfocused = cpu.Mode == CPU.Modes.OFF;
            Events["TogglePowerOff"].active = Events["TogglePowerOff"].guiActiveUnfocused = cpu.Mode != CPU.Modes.OFF;

            if (part.State == PartStates.DEAD)
            {
                cpu.Mode = CPU.Modes.OFF;
                return;
            }

            cpu.Update(Time.deltaTime);

            cpu.ProcessElectricity(this.part, TimeWarp.fixedDeltaTime);

            UpdateParts();
        }