public override ThenResponse Perform(EventInfo eventInfo) { Variables connectionVariables; if (Direction == DataDirection.Origin) { connectionVariables = eventInfo.ProxyConnection.ToOriginConnectionVariables; } else { connectionVariables = eventInfo.ProxyConnection.ToTargetConnectionVariables; } EventInfo newEventInfo = eventInfo.Clone(direction: Direction, type: EventType.Message, message: new Message() { RawText = MessageText.GetText(eventInfo.Variables) + Delimiter, Delimiter = Delimiter, }, variables: connectionVariables); if (InsertAtBeginning) { eventInfo.Engine.Queue.AddFirst(newEventInfo); } else { eventInfo.Engine.Queue.AddLast(newEventInfo); } return(ThenResponse.Continue); }
// private Text txt; void Start() { txtPanel = gameObject.GetComponent <Text>(); txtObj = gameObject.GetComponent <MessageText>(); txtObj.Init(); txtPanel.text = txtObj.GetText(0); i = 0; thePlayer = FindObjectOfType <PlayerKeyboardController>(); if (thePlayer != null) { initSpeed = thePlayer.speed; thePlayer.speed = 0; } }
public void onClick() { i++; try { txtPanel.text = txtObj.GetText(i); } catch (System.Exception) { gameObject.transform.parent.gameObject.SetActive(false); if (thePlayer != null) { thePlayer.speed = initSpeed; } } gameObject.transform.parent.GetComponent <AudioSource>().Play(); }