/* * GUI stuff */ public void TurnOnGUI(GameObject _trigger) { //signal that it's ok to show text activeGUI = true; // set current trigger & kDrop currentTrigger = _trigger; currentKDrop = currentTrigger.GetComponent <KnowledgeDrop> (); //enable prompt text enablePrompt(); Time.timeScale = 0.3f; //slow down the world speed }
/* * GUI stuff */ public void TurnOnGUI(GameObject _trigger) { activeGUI = true; cursor_x = cursor_origin.x; cursor_y = cursor_origin.y; // set current trigger & kDrop currentTrigger = _trigger; currentKDrop = currentTrigger.GetComponent <KnowledgeDrop> (); TurnOnGUIText(); // float newX = -margin - background.width / 2 - topicText.GetScreenRect ().width / 2; // float newY = -margin - topicText.GetScreenRect().height / 2; // topTextPosition = new Vector2 (newX, newY); // Debug.Log (newY); // topicText.pixelOffset = new Vector2 (-margin - background.width/2 - topicText.GetScreenRect().width/2, newY); // set its position }
void Start() { kDrop = GetComponent <KnowledgeDrop> (); }
/* * GUI stuff */ public void TurnOnGUI(GameObject _trigger) { //signal that it's ok to show text activeGUI = true; // set current trigger & kDrop currentTrigger = _trigger; currentKDrop = currentTrigger.GetComponent<KnowledgeDrop> (); //enable prompt text enablePrompt (); Time.timeScale = 0.3f; //slow down the world speed }