void Start() { //isHighFeedback = false; interfaceB = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>(); if(null != okButton) interfaceB.localizationUtils.AddTranslationButton(okButton, "{ok}"); }
public LocalizedButton(Button _mc, string _text) { mc = _mc; text = _text; interfaces = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>(); SetButtonState(); }
public void Initialize(Task _task) { interfaceB = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>(); //Debug.Log("prova " + interfaceB.name); task = _task; if (title.text.Length > maxStringCountTitle) { title.text = title.text.Substring(0, maxStringCountTitle) + "..."; } else { title.text = _task.title; } if (_task.description.Length > maxStringCountDescr) { description.text = _task.description.Substring(0, maxStringCountDescr) + "..."; } else { description.text = _task.description; } state = _task.taskState; bitmapNumber.text = _task.number.ToString(); switch (state) { case TaskState.New: this.GetComponent<Button>().interactable = true; maskLock.SetActive(false); informationTask.gameObject.SetActive(true); stateText.color = InterfaceBehaviour.Orange; interfaceB.localizationUtils.AddTranslationText(stateText, "{new_task}"); break; case TaskState.Visited: this.GetComponent<Button>().interactable = true; maskLock.SetActive(false); informationTask.gameObject.SetActive(true); stateText.color = InterfaceBehaviour.ClearGreen; interfaceB.localizationUtils.AddTranslationText(stateText, "{visited_task}"); break; case TaskState.Locked: this.GetComponent<Button>().interactable = false; stateText.color = InterfaceBehaviour.Grey; interfaceB.localizationUtils.AddTranslationText(stateText, "{locked_task}"); maskLock.SetActive(true); informationTask.gameObject.SetActive(false); break; } }
void Start() { duration = 0.25f; workspace = GameObject.FindGameObjectWithTag("Workspace").GetComponent<Workspace>(); initialPosition = this.transform.position; interfaceB = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>(); widthSize = Camera.main.orthographicSize * 2.0f * Camera.main.aspect; heightSize = widthSize / Camera.main.aspect; isFinished = false; }
// Use this for initialization void Start() { interfaceB = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>(); bitmapNumber.UpdateBitmapText(); gameObject.GetComponent<RectTransform>().localScale = new Vector3(1.0f,1.0f,1.0f); }