Implemented resource manager which can load textures and levels.
Implemented script to generate Resources.g.h file linking assets to code. Added assets from old project.
This commit is contained in:
18
oldproject/Assets/Scripts/Model/Layer.cs
Executable file
18
oldproject/Assets/Scripts/Model/Layer.cs
Executable file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class Layer
|
||||
{
|
||||
public string Name;
|
||||
|
||||
public int Width;
|
||||
public int Height;
|
||||
|
||||
public int[,] Cells;
|
||||
}
|
||||
}
|
12
oldproject/Assets/Scripts/Model/Layer.cs.meta
Executable file
12
oldproject/Assets/Scripts/Model/Layer.cs.meta
Executable file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ece066914ebb15a4eb9364302cc4b0b5
|
||||
timeCreated: 1477767546
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
41
oldproject/Assets/Scripts/Model/Map.cs
Executable file
41
oldproject/Assets/Scripts/Model/Map.cs
Executable file
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class Map
|
||||
{
|
||||
/// <summary>
|
||||
/// The width of the map in tiles
|
||||
/// </summary>
|
||||
public int Width = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The height of the map in tiles
|
||||
/// </summary>
|
||||
public int Height = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The width of a tile in pixels
|
||||
/// </summary>
|
||||
public int TileWidth = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The height of a tile in pixels
|
||||
/// </summary>
|
||||
public int TileHeight = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Loaded tile sets
|
||||
/// </summary>
|
||||
public Dictionary<int, Tile> Tiles = new Dictionary<int, Tile>();
|
||||
|
||||
/// <summary>
|
||||
/// Layers
|
||||
/// </summary>
|
||||
public List<Layer> Layers = new List<Layer>();
|
||||
}
|
||||
}
|
12
oldproject/Assets/Scripts/Model/Map.cs.meta
Executable file
12
oldproject/Assets/Scripts/Model/Map.cs.meta
Executable file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52238496c720c374994d050a357a309c
|
||||
timeCreated: 1477764951
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
oldproject/Assets/Scripts/Model/Tile.cs
Executable file
15
oldproject/Assets/Scripts/Model/Tile.cs
Executable file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class Tile
|
||||
{
|
||||
public string ImageSource;
|
||||
public int Width;
|
||||
public int Height;
|
||||
}
|
||||
}
|
12
oldproject/Assets/Scripts/Model/Tile.cs.meta
Executable file
12
oldproject/Assets/Scripts/Model/Tile.cs.meta
Executable file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0061c920a4f77a46ac2e6cd1174374d
|
||||
timeCreated: 1477767546
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user