//public Camera mainCamera; void Start() { image = GetComponent <Image>(); CB = FindObjectOfType(typeof(CellButtons)) as CellButtons; Debug.Log("start"); //originalP = transform.position; Debug.Log(originalP.x + " " + originalP.y + " " + originalP.z); offset = new Vector2(50, 50); }
private void addCellButton(Point i_LogicCordinates) { TicTacToeCellButton cellButton = new TicTacToeCellButton(i_LogicCordinates) { Size = DefaultButtonSize, Location = calculateVisualPoint(i_LogicCordinates, DefaultButtonSize, DefaultPadding) }; CellButtons.Add(cellButton); cellButton.Click += CellButton_Click; cellButton.MouseEnter += CellButton_MouseEnter; cellButton.MouseLeave += CellButton_MouseLeave; Controls.Add(cellButton); }