예제 #1
0
 private void Awake()
 {
     photocopierState = PhotocopierState.Idle;
     registerObject   = gameObject.GetComponent <RegisterObject>();
     printer          = new Internal.Printer(0, trayCapacity, false);
     scanner          = new Internal.Scanner(false, true, null, null);
 }
예제 #2
0
 public void ServerPerformInteraction(HandApply interaction)
 {
     if (interaction.HandObject == null)
     {
         if (printer.TrayOpen)
         {
             Chat.AddExamineMsgFromServer(interaction.Performer, "You close the tray.");
             ToggleTray();
         }
         else if (scanner.ScannerOpen)
         {
             Chat.AddExamineMsgFromServer(interaction.Performer, "You close the scanner lid.");
             ToggleScannerLid();
         }
         else
         {
             OnGuiRenderRequired();
             TabUpdateMessage.Send(interaction.Performer, gameObject, NetTabType, TabAction.Open);
         }
     }
     else if (printer.CanAddPageToTray(interaction.HandObject))
     {
         printer = printer.AddPageToTray(interaction.HandObject);
         Chat.AddExamineMsgFromServer(interaction.Performer, "You place the sheet in the tray.");
     }
     else if (scanner.CanPlaceDocument(interaction.HandObject))
     {
         scanner = scanner.PlaceDocument(interaction.HandObject);
         Chat.AddExamineMsgFromServer(interaction.Performer, "You place the document in the scanner.");
     }
 }
예제 #3
0
        private IEnumerator WaitForPrint()
        {
            yield return(WaitFor.Seconds(4f));

            SyncPhotocopierState(PhotocopierState.Idle);
            printer = printer.Print(scanner.ScannedText, gameObject, photocopierState == PhotocopierState.Idle, paperPrefab);
            OnGuiRenderRequired();
        }
예제 #4
0
 public void ToggleTray()
 {
     printer = printer.ToggleTray();
     OnGuiRenderRequired();
 }
예제 #5
0
 public static void WritePrinter(this NetworkWriter writer, Printer printer)
 {
     writer.Write(printer.TrayCount);
     writer.Write(printer.TrayCapacity);
     writer.WriteBool(printer.TrayOpen);
 }