public void InterpretVisualMessage(string code) { if (VisualCommunicationController.flagCodes.TryGetValue(code, out VisualMessage value)) { int reaction = GetMessageReaction(code); if (reaction == 0) //Positive response to tension { GameManager.isAlly = false; gameManager.DecreaseTension(1f, false); } else if (reaction == 1) //Negative response to tension { GameManager.isAlly = false; timeLineController.AddNewEvent(5f, TimeLineController.TimeEventType.BOMB); timeLineController.doAttack = false; gameManager.IncreaseTension(1f, false); } else //Neutral response to tension { } visualController.ManageVisualFeedback(); } else //Non-existent message { //Debug.Log("THIS MESSAGE IS NON-SENSE!"); } visualController.playerMessage = ""; }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.R)) { timeLineController.AddNewEvent(5f, TimeLineController.TimeEventType.BOMB); } if (Input.GetKeyDown(KeyCode.T)) { timeLineController.AddNewEvent(6f, TimeLineController.TimeEventType.FREQUENCY); } if (Input.GetKeyDown(KeyCode.Y)) { timeLineController.AddNewEvent(5f, TimeLineController.TimeEventType.RADIO); } if (Input.GetKeyDown(KeyCode.U)) { timeLineController.AddNewEvent(10f, TimeLineController.TimeEventType.VISUAL); } if (Input.GetKeyDown(KeyCode.E)) { currentScreen = Screens.GLASS; GoToVisualRoom(true); Debug.Log("IN VISUAL ROOM"); } if (Input.GetKeyDown(KeyCode.W)) { currentScreen = Screens.RADIO; GoToRadio(true); Debug.Log("IN RADIO"); } if (Input.GetKeyDown(KeyCode.Q)) { currentScreen = Screens.CALIBRATE; GoToCalibrate(true); Debug.Log("IN CALIBRATION"); } if (Input.GetKeyDown(KeyCode.I)) { currentScreen = Screens.REPAIR; GoToRepair(true); Debug.Log("IN REPAIR"); } //if (Input.GetKeyDown(KeyCode.A)) //{ // GameManager.currentTension = Tension.PEACEFUL; //} //if (Input.GetKeyDown(KeyCode.S)) //{ // GameManager.currentTension = Tension.LOW; //} //if (Input.GetKeyDown(KeyCode.D)) //{ // GameManager.currentTension = Tension.MEDIUM; //} //if (Input.GetKeyDown(KeyCode.F)) //{ // GameManager.currentTension = Tension.DANGER; //} //if (Input.GetKeyDown(KeyCode.G)) //{ // GameManager.currentTension = Tension.THREAT; //} }