Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into Alpha_…
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
dpeter99 committed Dec 23, 2015
2 parents 1dfc6f4 + 9e6ec16 commit 99bc3d5
Show file tree
Hide file tree
Showing 431 changed files with 8,766 additions and 7,265 deletions.
23 changes: 12 additions & 11 deletions Assets/AssetsLoading/AssetsLoader.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine;
using CivMars;

public class AssetsLoader : MonoBehaviour
namespace CivMarsEngine.Registry
{

public void CallRegister()
public class AssetsLoader : MonoBehaviour
{


CivMarsInit.Init();
public void CallRegister()
{

}

}
CivMarsInit.Init();

}

}

}
107 changes: 54 additions & 53 deletions Assets/AssetsLoading/GameRegystry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,78 @@
using System.Text;
using UnityEngine;


static class GameRegystry
namespace CivMarsEngine
{
public static Dictionary<string, IRegystratabe> all = new Dictionary<string, IRegystratabe>();
static class GameRegystry
{
public static Dictionary<string, IRegystratabe> all = new Dictionary<string, IRegystratabe>();

public static Dictionary<String,Building> buildings = new Dictionary<String, Building>();
public static Dictionary<String, Building> buildings = new Dictionary<String, Building>();

public static void RegisterBuildableBuilding(string ID, Building b)
{
if (b is Building)
public static void RegisterBuildableBuilding(string ID, Building b)
{
buildings.Add(ID, b);
Debug.Log(ID);
if (b is Building)
{
buildings.Add(ID, b);
Debug.Log(ID);
}
}
}

public static Dictionary<string, IWorldGen> ores = new Dictionary<string, IWorldGen>();
//public static List<IWorldGen> ores = new List<IWorldGen>();

public static void RegisterWorldGen(string ID,IWorldGen b)
{
ores.Add(ID,b);
Debug.Log(b.ToString());
}

public static Dictionary<String, List<Recipe>> recepies = new Dictionary<String, List<Recipe>>();
public static Dictionary<string, IWorldGen> ores = new Dictionary<string, IWorldGen>();
//public static List<IWorldGen> ores = new List<IWorldGen>();

public static void RegisterRecepie(string ID, Recipe b)
{
if (recepies.ContainsKey(ID))
{
recepies[ID].Add(b);
}
else
public static void RegisterWorldGen(string ID, IWorldGen b)
{
recepies.Add(ID, new List<Recipe>());
recepies[ID].Add(b);
ores.Add(ID, b);
Debug.Log(b.ToString());
}
Debug.Log(ID);
}

public static Dictionary<String, Item> items = new Dictionary<String, Item>();
public static Dictionary<String, List<Recipe>> recepies = new Dictionary<String, List<Recipe>>();

public static void RegisterItem(string ID, Item b)
{
if (recepies.ContainsKey(ID))
{
throw new System.NotImplementedException();
}
else
public static void RegisterRecepie(string ID, Recipe b)
{
if (b is IRegystratabe)
((IRegystratabe)b).Regystrate();
items.Add(ID, b);
if (recepies.ContainsKey(ID))
{
recepies[ID].Add(b);
}
else
{
recepies.Add(ID, new List<Recipe>());
recepies[ID].Add(b);
}
Debug.Log(ID);
}
}

public static Sprite GetSprite(string path,string name)
{
UnityEngine.Object[] a = Resources.LoadAll(path);
foreach (UnityEngine.Object item in a)
{
public static Dictionary<String, Item> items = new Dictionary<String, Item>();

if (item is Sprite && item.name == name)
public static void RegisterItem(string ID, Item b)
{
if (recepies.ContainsKey(ID))
{
return item as Sprite;
throw new System.NotImplementedException();
}
else
{
if (b is IRegystratabe)
((IRegystratabe)b).Regystrate();
items.Add(ID, b);
Debug.Log(ID);
}
}

return null;
}
}
public static Sprite GetSprite(string path, string name)
{
UnityEngine.Object[] a = Resources.LoadAll(path);
foreach (UnityEngine.Object item in a)
{

if (item is Sprite && item.name == name)
{
return item as Sprite;
}
}

return null;
}
}
}
9 changes: 9 additions & 0 deletions Assets/BasicUtility.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions Assets/TileMap.meta → Assets/BasicUtility/TileMap.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions Assets/BasicUtility/TileMap/Tile/Surface/Surface.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using UnityEngine;
using System.Collections;

namespace CivMarsEngine
{
public class Surface : Tiled
{

/*
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
*/
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public Tile(int xpos, int ypos)
}


}
}
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public void SetTileMap(TileMap t)
}


}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 99bc3d5

Please sign in to comment.