/* * // TESTE * for (int i = 0; i < rootCells.childCount; i++) { * rootCells.GetChild(i).gameObject.SetActive(false); * } * * TODO: Botar um Debug no final de cada metodo para saber a ordem que eles sao chamados * TODO: Descobrir onde os métodos são chamados * TODO: No final do ultimo metodo, desativar todas as peças * TODO: Ativar elas novamente e ver se está tudo OK * TODO: ativar a peça na posicao do botao */ void Awake() { pictOver.gameObject.SetActive(false); prefGroup.gameObject.SetActive(false); float aspect = Screen.width / (float)Screen.height; rectScreen = new Rect(-Camera.main.orthographicSize * aspect, -Camera.main.orthographicSize, Camera.main.orthographicSize * aspect * 2, Camera.main.orthographicSize * 2); scrollMovement = FindObjectOfType <ScrollMovement>(); border = GameObject.FindGameObjectWithTag("CanvasMaskPivot").GetComponent <RectTransform>(); manager = GameObject.Find("Manager"); edgeVector = Camera.main.ViewportToWorldPoint(topRightCorner); print("Antes: " + edgeVector); edgeVector = border.position; print("Depois: " + edgeVector); edgeVector = edgeVector - new Vector3(70, 70); /* * var screenPoint = RectTransformUtility.WorldToScreenPoint(canvas.worldCamera, worldPoint); * Vector2 localPoint; * RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas.GetComponent<RectTransform>(), screenPoint, canvas.worldCamera, out localPoint); * transform.localPosition = localPoint; * * RectTransformUtility.ScreenPointToLocalPointInRectangle(gameCanvas.transform as RectTransform, Input.mousePosition, Camera.main, out pos);*/ }
void Start() { border = GameObject.FindGameObjectWithTag("CanvasMaskPivot").GetComponent <RectTransform>(); scrollMovement = FindObjectOfType <ScrollMovement>(); StartCoroutine(RearangePiecesFirstTime()); }
public abstract void ScrollTextArea(int left, int bottom, int right, int top, Direction direction, ScrollMovement movement);
public override void ScrollTextArea(int left, int bottom, int right, int top, Direction direction, ScrollMovement movement) { throw new NotImplementedException(); }
// Start is called before the first frame update void Start() { current = this; LoadRecord(); baseVelocity = velocity; }