Esempio n. 1
0
 private void DrawGrid()
 {
     MazeWorld.Grid g = Maze;
     for (int i = 0; i < g.MaxX; i++)
     {
         for (int j = 0; j < g.MaxY; j++)
         {
             Vector3Int pos = new Vector3Int(i, j, 0);
             Entity     e   = g.Get(i, j);
             if (e != null)
             {
                 UnityEngine.Color c = ColorMap.ConvertColor(e.Color);
                 tileMap.SetColor(pos, c);
             }
             else
             {
                 // If there is no entity, then set the color to white
                 tileMap.SetColor(pos, UnityEngine.Color.white);
             }
         }
     }
 }
Esempio n. 2
0
 public Actor(Color c, Grid g, Location l) : base(g, l)
 {
     this.Color = c;
 }