Esempio n. 1
0
	public GameObject CreateGuiCell(GuiCell MyCell) {
		MyCell.ObjectReference = (GameObject)CreateGuiItem (MyCell.Position, MyCell.Size);
		return MyCell.ObjectReference;
	}
Esempio n. 2
0
	public List<GuiCell> CreateGuiCells(Vector3 CellSize) {
		List<GuiCell> MyCells = new List<GuiCell> ();

		for (int j = 0; j < ColumnsMax; j++)	
			for (int i = 0; i < RowsMax; i++)
		{
			GuiCell NewCell = new GuiCell();
			NewCell.Position = new Vector3(i*CellSize.x, j*CellSize.y, 0);
			NewCell.Position = new Vector3(NewCell.Position.x*MarginPercentageX+MarginAdditionX, 
			                               NewCell.Position.y*MarginPercentageY+MarginAdditionY, 0);
			NewCell.Size = CellSize;
			MyCells.Add (NewCell);
		}
		return MyCells;
	}