コード例 #1
0
 public void Draw()
 {
     for (var row = 0; row < this.rows; row++)
     {
         for (var col = 0; col < this.cols; col++)
         {
             if (base.isPopulated(row, col))
             {
                 Gridable   gridable = this.Get(row, col);
                 GameObject prefab   = gridable.GetPrefab();
                 Vector3    position = this.ComputePosition(row, col);
                 Quaternion rotation = Quaternion.Euler(0, 0, 0);
                 GameObject go       = MonoBehaviour.Instantiate(prefab, position, rotation) as GameObject;
                 go.transform.parent = this.parent;
             }
         }
     }
 }
コード例 #2
0
 public void Set(int row, int col, Gridable obj)
 {
     this.grid[row, col] = obj;
 }
コード例 #3
0
 new public void Set(int row, int col, Gridable obj)
 {
     base.Set(row, col, obj);
 }