public void SetSecurityListeners() { List <Button> buttons = interactiveSprite.actionButtonManager.GetActiveCanvasGroup(1); if (tutorialManager.securityCheckFirstTime) { //show info message for security check securityMessageRoutine = SecurityMessage(); StartCoroutine(securityMessageRoutine); } buttons[0].GetComponentInChildren <TextMeshProUGUI>().text = "Imposta accesso"; buttons[0].onClick.RemoveAllListeners(); buttons[0].onClick.AddListener(delegate { //ToggleSecurityScreen(); interactiveSprite.ToggleMenu(); }); foreach (Button button in buttons) { button.interactable = true; } //disable interact with button until tutorial is finished if (tutorialManager.tutorialIsFinished) { return; } foreach (Button button in buttons) { button.interactable = false; } }
public void SetTelephoneListeners() { if (tutorialManager.telephoneFirstTime) { //show info message for security check telephone1Routine = Telephone1Routine(); StartCoroutine(telephone1Routine); } List <Button> buttons; buttons = interactiveSprite.actionButtonManager.GetActiveCanvasGroup(3); buttons[0].GetComponentInChildren <TextMeshProUGUI>().text = "Richiedi fondi"; buttons[0].onClick.RemoveAllListeners(); buttons[1].GetComponentInChildren <TextMeshProUGUI>().text = "Vai alle lezioni"; buttons[1].onClick.RemoveAllListeners(); buttons[1].onClick.AddListener(delegate { ClassDb.notebookManager.ToggleNoteBook(); interactiveSprite.ToggleMenu(); }); buttons[2].GetComponentInChildren <TextMeshProUGUI>().text = "Check dell'impianto"; buttons[2].onClick.RemoveAllListeners(); foreach (Button button in buttons) { button.interactable = true; } //disable interact with button until tutorial is finished if (tutorialManager.tutorialIsFinished) { return; } foreach (Button button in buttons) { //keep active button for scada screen and store screen if (buttons.IndexOf(button) == 1) { continue; } button.interactable = false; } }
public void SetComputerListeners() { if (tutorialManager.roomPcFirstTime) { //show info message for security check hmipcRoutine = HmiPcRoutine(); StartCoroutine(hmipcRoutine); } List <Button> buttons = interactiveSprite.actionButtonManager.GetActiveCanvasGroup(7); //buttons[0].GetComponentInChildren<TextMeshProUGUI>().text = "Apri monitor SCADA"; //buttons[0].onClick.RemoveAllListeners(); //buttons[0].onClick.AddListener(delegate //{ // ToggleScadaScreen(); // interactiveSprite.ToggleMenu(); //}); buttons[0].GetComponentInChildren <TextMeshProUGUI>().text = "Vai al Negozio"; buttons[0].onClick.RemoveAllListeners(); buttons[0].onClick.AddListener(delegate { ToggleStoreScreen(); interactiveSprite.ToggleMenu(); }); if (tutorialManager.tutorialGameData.isFirewallActive) { buttons[1].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva Firewall"; buttons[1].onClick.RemoveAllListeners(); buttons[1].onClick.AddListener(delegate { tutorialManager.SetFirewallActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[1].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva Firewall"; buttons[1].onClick.RemoveAllListeners(); buttons[1].onClick.AddListener(delegate { tutorialManager.SetFirewallActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } if (tutorialManager.tutorialGameData.isRemoteIdsActive) { buttons[2].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva IDS"; buttons[2].onClick.RemoveAllListeners(); buttons[2].onClick.AddListener(delegate { tutorialManager.SetRemoteIdsActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[2].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva IDS"; buttons[2].onClick.RemoveAllListeners(); buttons[2].onClick.AddListener(delegate { tutorialManager.SetRemoteIdsActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } if (tutorialManager.tutorialGameData.isLocalIdsActive) { buttons[3].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva Controlli Locali"; buttons[3].onClick.RemoveAllListeners(); buttons[3].onClick.AddListener(delegate { tutorialManager.SetLocalIdsActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[3].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva Controlli Locali"; buttons[3].onClick.RemoveAllListeners(); buttons[3].onClick.AddListener(delegate { tutorialManager.SetLocalIdsActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } buttons[4].GetComponentInChildren <TextMeshProUGUI>().text = "Check configurazione di rete"; buttons[4].onClick.RemoveAllListeners(); buttons[5].GetComponentInChildren <TextMeshProUGUI>().text = "Esegui scansione malware"; buttons[5].onClick.RemoveAllListeners(); buttons[6].GetComponentInChildren <TextMeshProUGUI>().text = "Individua minacce"; buttons[6].onClick.RemoveAllListeners(); foreach (Button button in buttons) { button.interactable = true; } //disable interact with button until tutorial is finished if (tutorialManager.tutorialIsFinished) { return; } foreach (Button button in buttons) { //keep active button for scada screen and store screen if (buttons.IndexOf(button) >= 0 && buttons.IndexOf(button) <= 3) { continue; } button.interactable = false; } }
public void SetSeverPcListeners() { if (tutorialManager.serverPcFirstTime) { //show info message for security check serverMessageRoutine = ServerMessageRoutine(); StartCoroutine(serverMessageRoutine); } List <Button> buttons = interactiveSprite.actionButtonManager.GetActiveCanvasGroup(7); if (tutorialManager.tutorialGameData.isFirewallActive) { buttons[0].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva Firewall"; buttons[0].onClick.RemoveAllListeners(); buttons[0].onClick.AddListener(delegate { tutorialManager.SetFirewallActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[0].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva Firewall"; buttons[0].onClick.RemoveAllListeners(); buttons[0].onClick.AddListener(delegate { tutorialManager.SetFirewallActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } if (tutorialManager.tutorialGameData.isRemoteIdsActive) { buttons[1].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva IDS"; buttons[1].onClick.RemoveAllListeners(); buttons[1].onClick.AddListener(delegate { tutorialManager.SetRemoteIdsActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[1].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva IDS"; buttons[1].onClick.RemoveAllListeners(); buttons[1].onClick.AddListener(delegate { tutorialManager.SetRemoteIdsActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } if (tutorialManager.tutorialGameData.isLocalIdsActive) { buttons[2].GetComponentInChildren <TextMeshProUGUI>().text = "Disattiva Controlli Locali"; buttons[2].onClick.RemoveAllListeners(); buttons[2].onClick.AddListener(delegate { tutorialManager.SetLocalIdsActive(false); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } else { buttons[2].GetComponentInChildren <TextMeshProUGUI>().text = "Attiva Controlli Locali"; buttons[2].onClick.RemoveAllListeners(); buttons[2].onClick.AddListener(delegate { tutorialManager.SetLocalIdsActive(true); interactiveSprite.ToggleMenu(); interactiveSprite.ToggleMenu(); }); } buttons[3].GetComponentInChildren <TextMeshProUGUI>().text = "Controlla eventi IDS"; buttons[3].onClick.RemoveAllListeners(); buttons[4].GetComponentInChildren <TextMeshProUGUI>().text = "Check configurazione di rete"; buttons[4].onClick.RemoveAllListeners(); buttons[5].GetComponentInChildren <TextMeshProUGUI>().text = "Riavvia server"; buttons[5].onClick.RemoveAllListeners(); buttons[6].GetComponentInChildren <TextMeshProUGUI>().text = "Esegui scansione malware"; buttons[6].onClick.RemoveAllListeners(); foreach (Button button in buttons) { button.interactable = true; } //disable interact with button until tutorial is finished if (tutorialManager.tutorialIsFinished) { return; } foreach (Button button in buttons) { if (buttons.IndexOf(button) >= 0 && buttons.IndexOf(button) <= 2) { continue; } button.interactable = false; } }