private void OnEnable() { _slowdownPart.Init(); _speedupPart.Init(); _rotationPart.Init(); _machineBreakPart.Init(); FlatConveyorBelt.SpecialBeltPressed += delegate { _slowdownPart?.Passed(); }; FlatConveyorBelt.SpecialBeltPressed += delegate { _speedupPart?.Passed(); }; FlatConveyorBelt.BeltRotated += delegate { _rotationPart?.Passed(); }; Machine.MachineBreaking += OnMachineBreak; Machine.MachineStartedRepairing += OnMachineRepair; }
private void OnMachineRepair() { _machineBreakPart.Passed(); Machine.MachineStartedRepairing -= OnMachineRepair; }