index = row x MaxColumn + col // 一个5x4的矩阵的index // 0,1,2,3, // 4,5,6,7, // 8,9,10,11, //12,13,14,15, //16,17,18,19
var row:number =Math.floor(index/GameData.MaxColumn) var col:number =index%GameData.MaxColumn (虽然老师讲的是index%GameData.MaxRow,但是通过实际换算,感觉应该是index%GameData.MaxColumn) 标签:index,column,GameData,index%,换算,MaxColumn,row From: https://www.cnblogs.com/grantgrant/p/16797980.html