Exemplo n.º 1
0
        /// <summary>
        /// Create a new dynamic tile.
        /// Dynamic tiles always run the update function every tick.
        /// </summary>
        /// <param name="brush">Rectangle of the position and size.</param>
        /// <param name="id">id of the dynamic tile to create.</param>
        /// <returns>instance of the created tile.</returns>
        public static Tile CreateTileDynamic(Rectangle brush, int id, int layer)
        {
            TileDynamic1 t = new TileDynamic1(brush, id);

            t.Initialize();
            World.tiles.Add(t);
            return(t);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new dynamic tile.
 /// Dynamic tiles always run the update function every tick.
 /// </summary>
 /// <param name="brush">Rectangle of the position and size.</param>
 /// <param name="id">id of the dynamic tile to create.</param>
 /// <returns>instance of the created tile.</returns>
 public static Tile CreateTileDynamic(Rectangle brush, int id, int layer)
 {
     TileDynamic1 t = new TileDynamic1(brush, id);
     t.Initialize();
     World.tiles.Add(t);
     return t;
 }