diff --git a/Assets/AssetsLoading/GameRegystry.cs b/Assets/AssetsLoading/GameRegystry.cs index edbfb1f..1ea3d84 100644 --- a/Assets/AssetsLoading/GameRegystry.cs +++ b/Assets/AssetsLoading/GameRegystry.cs @@ -4,77 +4,78 @@ using System.Text; using UnityEngine; - -static class GameRegystry +namespace CivMarsEngine { - public static Dictionary all = new Dictionary(); + static class GameRegystry + { + public static Dictionary all = new Dictionary(); - public static Dictionary buildings = new Dictionary(); + public static Dictionary buildings = new Dictionary(); - 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 ores = new Dictionary(); - //public static List ores = new List(); - - public static void RegisterWorldGen(string ID,IWorldGen b) - { - ores.Add(ID,b); - Debug.Log(b.ToString()); - } - public static Dictionary> recepies = new Dictionary>(); + public static Dictionary ores = new Dictionary(); + //public static List ores = new List(); - 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()); - recepies[ID].Add(b); + ores.Add(ID, b); + Debug.Log(b.ToString()); } - Debug.Log(ID); - } - public static Dictionary items = new Dictionary(); + public static Dictionary> recepies = new Dictionary>(); - 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()); + 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 items = new Dictionary(); - 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; + } + } +} \ No newline at end of file diff --git a/Assets/BasicUtility/TileMap/Tile/Surface/Surface.cs b/Assets/BasicUtility/TileMap/Tile/Surface/Surface.cs index 6c5717c..82d4004 100644 --- a/Assets/BasicUtility/TileMap/Tile/Surface/Surface.cs +++ b/Assets/BasicUtility/TileMap/Tile/Surface/Surface.cs @@ -1,17 +1,21 @@ using UnityEngine; using System.Collections; -public class Surface : Tiled { +namespace CivMarsEngine +{ + public class Surface : Tiled + { - /* - // Use this for initialization - void Start () { - - } - - // Update is called once per frame - void Update () { - + /* + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + */ } - */ } diff --git a/Assets/BasicUtility/TileMap/Tile/Tile.cs b/Assets/BasicUtility/TileMap/Tile/Tile.cs index db91261..afc404f 100644 --- a/Assets/BasicUtility/TileMap/Tile/Tile.cs +++ b/Assets/BasicUtility/TileMap/Tile/Tile.cs @@ -12,4 +12,4 @@ public Tile(int xpos, int ypos) } -} +} \ No newline at end of file diff --git a/Assets/BasicUtility/TileMap/TileTransform.cs b/Assets/BasicUtility/TileMap/TileTransform.cs index 0ce7163..2550153 100644 --- a/Assets/BasicUtility/TileMap/TileTransform.cs +++ b/Assets/BasicUtility/TileMap/TileTransform.cs @@ -31,4 +31,4 @@ public void SetTileMap(TileMap t) } -} +} \ No newline at end of file diff --git a/Assets/CivMars/Buildings/Building.cs b/Assets/CivMars/Buildings/Building.cs deleted file mode 100644 index 414afb8..0000000 --- a/Assets/CivMars/Buildings/Building.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; - -[AddComponentMenu("Buildings/Building")] -public class Building : Tiled, IHasGui, IPointerClickHandler, ISaveble -{ - public string ID; - - public List buildingMaterials; - - public GameObject Graphicks; - public bool guion; - - public override void Awake() - { - base.Awake(); - } - - public void PositionUpdate() - { - Graphicks.SetActive(false); - this.Graphicks.transform.position = Vector3.zero; - } - - #region IhasGui - public void TogelGui() - { - if (!guion) - { - if (GameCon.AlloweGUI(this as IHasGui)) - { - Open(); - } - } - else - { - GameCon.CloseGUI(this as IHasGui); - Close(); - } - } - - public virtual void Open() - { - guion = true; - Graphicks.SetActive(true); - } - - public virtual void Close() - { - guion = false; - Graphicks.SetActive(false); - } - - public int ClosingLevel() - { - return 1; - } - - public void OnPointerClick(PointerEventData eventData) - { - if (!eventData.rawPointerPress.transform.IsChildOf(Graphicks.transform)) - TogelGui(); - } - #endregion - - #region ISaveble - - public virtual SavedTile Save() - { - SavedTile s = new SavedTile(ID); - return s; - } - - public void Load(SavedTile data) - { - throw new NotImplementedException(); - } - - public GameObject GetPrefab() - { - throw new NotImplementedException(); - } - #endregion -} \ No newline at end of file diff --git a/Assets/CivMars/Buildings/Chest.cs b/Assets/CivMars/Buildings/Chest.cs index 2737212..83bc99b 100644 --- a/Assets/CivMars/Buildings/Chest.cs +++ b/Assets/CivMars/Buildings/Chest.cs @@ -3,11 +3,12 @@ using UnityEngine.UI; using System; using System.Collections.Generic; +using CivMarsEngine; namespace CivMars { [AddComponentMenu("Buildings/Chest")] - public class Chest : Building, IInventory, IBuildable, IRegystratabe, IHasGui, ISaveble + public class Chest : BuildingWGUI, IInventory, IBuildable, IRegystratabe, IHasGui, ISaveble { new public static string ID = CivMarsInit.BlockSpace + ".Chest"; @@ -18,7 +19,7 @@ public class Chest : Building, IInventory, IBuildable, IRegystratabe, IHasGui, I public Sprite Icon; - static Item[] buildingMaterials = { new SandOre(2) }; + static new Item[] buildingMaterials = { new SandOre(2) }; bool invOn; @@ -57,7 +58,7 @@ public Sprite GetImage() return Icon; } - public GameObject GetPrefab() + public override GameObject GetPrefab() { return gameObject; } diff --git a/Assets/CivMars/Buildings/Furnace.cs b/Assets/CivMars/Buildings/Furnace.cs index a016170..fa82917 100644 --- a/Assets/CivMars/Buildings/Furnace.cs +++ b/Assets/CivMars/Buildings/Furnace.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System; using UnityEngine.UI; +using CivMarsEngine; namespace CivMars { - public class Furnace : Building, IRegystratabe, IBuildable, IInventory, IHasGui, ICrafter + public class Furnace : BuildingWGUI, IRegystratabe, IBuildable, IInventory, IHasGui, ICrafter { enum States @@ -18,7 +19,7 @@ enum States public List craftingQueue = new List(); - public string ID = "CivMars.Furnace"; + public new string ID = "CivMars.Furnace"; static Item[] neededMaterials = { new SandOre(1) }; public Sprite icon; @@ -168,7 +169,7 @@ public Sprite GetImage() return icon; } - public GameObject GetPrefab() + public override GameObject GetPrefab() { return gameObject; } diff --git a/Assets/CivMars/Buildings/GreenHouse.cs b/Assets/CivMars/Buildings/GreenHouse.cs index 4cfc01e..476583d 100644 --- a/Assets/CivMars/Buildings/GreenHouse.cs +++ b/Assets/CivMars/Buildings/GreenHouse.cs @@ -2,15 +2,16 @@ using System.Collections; using System; using UnityEngine.UI; +using CivMarsEngine; namespace CivMars { - public class GreenHouse : Building, IInventory, IHasGui, IBuildable, IRegystratabe + public class GreenHouse : BuildingWGUI, IInventory, IHasGui, IBuildable, IRegystratabe { Inventory storage = new Inventory(5); public Sprite icon; Item[] x = { new IronPlate(1), new GlassPlane(1), new Sapling(1) }; - string ID = "CivMars.GreenHouse"; + new string ID = "CivMars.GreenHouse"; float timeleft = 6000; bool onoff = false; @@ -119,7 +120,7 @@ public Sprite GetImage() return icon; } - public GameObject GetPrefab() + public override GameObject GetPrefab() { return this.gameObject; } diff --git a/Assets/CivMars/Buildings/MainBuilding.cs b/Assets/CivMars/Buildings/MainBuilding.cs index 60e8cd5..be26f44 100644 --- a/Assets/CivMars/Buildings/MainBuilding.cs +++ b/Assets/CivMars/Buildings/MainBuilding.cs @@ -1,13 +1,13 @@ using System; using UnityEngine.UI; using UnityEngine; - +using CivMarsEngine; namespace CivMars { [AddComponentMenu("Buildings/Main Building")] [System.Serializable] - public class MainBuilding : Building, IInventory, IGasTank, IRegystratabe, ISaveble + public class MainBuilding : BuildingWGUI, IInventory, IGasTank, IRegystratabe, ISaveble { enum States { @@ -16,7 +16,7 @@ enum States Gas } - public static string ID = "CivMars.MainBuilding"; + new public static string ID = "CivMars.MainBuilding"; public Text Name; public Text InventoryButtonText; @@ -166,7 +166,7 @@ public void Regystrate() } #endregion - public GameObject GetPrefab() + public override GameObject GetPrefab() { return gameObject; } diff --git a/Assets/CivMars/Buildings/Miner.cs b/Assets/CivMars/Buildings/Miner.cs index 2c51d69..d2ebd2d 100644 --- a/Assets/CivMars/Buildings/Miner.cs +++ b/Assets/CivMars/Buildings/Miner.cs @@ -1,12 +1,13 @@ using System; +using CivMarsEngine; using UnityEngine; using UnityEngine.UI; namespace CivMars { - public class Miner : Building, IInventory, IHasGui, IRegystratabe, IBuildable + public class Miner : BuildingWGUI, IInventory, IHasGui, IRegystratabe, IBuildable { - public string ID = "CivMars.Miner"; + new public string ID = "CivMars.Miner"; static Item[] neededMaterials = { new SandOre(1) }; public Sprite icon; @@ -127,7 +128,7 @@ public Sprite GetImage() return icon; } - public GameObject GetPrefab() + public override GameObject GetPrefab() { return gameObject; } diff --git a/Assets/CivMars/Buildings/PlanedBuilding.cs b/Assets/CivMars/Buildings/PlanedBuilding.cs index 4b26b5d..a6b3686 100644 --- a/Assets/CivMars/Buildings/PlanedBuilding.cs +++ b/Assets/CivMars/Buildings/PlanedBuilding.cs @@ -6,7 +6,7 @@ namespace CivMarsEngine { - public class PlanedBuilding : Building, ISaveble, IRegystratabe + public class PlanedBuilding : BuildingWGUI, ISaveble, IRegystratabe { public new string ID = "CivMarsEngine.PlanedBuilding"; diff --git a/Assets/CivMars/Buildings/Press.cs b/Assets/CivMars/Buildings/Press.cs index b82928e..3dc5f99 100644 --- a/Assets/CivMars/Buildings/Press.cs +++ b/Assets/CivMars/Buildings/Press.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System; using UnityEngine.UI; +using CivMarsEngine; namespace CivMars { - public class Press : Building, IInventory, IHasGui, IRegystratabe, ICrafter, IBuildable + public class Press : BuildingWGUI, IInventory, IHasGui, IRegystratabe, ICrafter, IBuildable { enum States @@ -18,7 +19,7 @@ enum States public List craftingQueue = new List(); - static public string ID = "CivMars.Press"; + new static public string ID = "CivMars.Press"; static Item[] neededMaterials = { new SandOre(1) }; public Sprite icon; diff --git a/Assets/CivMars/Buildings/Tiled.cs b/Assets/CivMars/Buildings/Tiled.cs index 32254b0..eb8c72a 100644 --- a/Assets/CivMars/Buildings/Tiled.cs +++ b/Assets/CivMars/Buildings/Tiled.cs @@ -1,23 +1,28 @@ using UnityEngine; using System.Collections; -[RequireComponent(typeof(TileTransform))] -public class Tiled : MonoBehaviour +namespace CivMarsEngine { - new public TileTransform transform; + [RequireComponent(typeof(TileTransform))] + public class Tiled : MonoBehaviour + { - protected GameController GameCon; + new public TileTransform transform; - // Use this for initialization - public virtual void Awake () { - transform = GetComponent(); + protected GameController GameCon; - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - if (GameCon == null) + // Use this for initialization + public virtual void Awake() { - Debug.LogErrorFormat("Can't find the GameController", this); - } + transform = GetComponent(); + + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + if (GameCon == null) + { + Debug.LogErrorFormat("Can't find the GameController", this); + } + } } -} +} \ No newline at end of file diff --git a/Assets/CivMarsInit.cs b/Assets/CivMars/CivMarsInit.cs similarity index 96% rename from Assets/CivMarsInit.cs rename to Assets/CivMars/CivMarsInit.cs index a1d64d3..56b3d1a 100644 --- a/Assets/CivMarsInit.cs +++ b/Assets/CivMars/CivMarsInit.cs @@ -1,58 +1,59 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; - -namespace CivMars -{ - [Mod] - public static class CivMarsInit - { - public const string ModSpace = "CivMars"; - public const string BlockSpace = "CivMars.block"; - public const string ItemSpace = "CivMars.item"; - - [ModInit] - public static void Init() - { - GameRegystry.RegisterItem("CivMars.IronIngot", new IronIngot()); - GameRegystry.RegisterItem("CivMars.IronPlate", new IronPlate()); - GameRegystry.RegisterItem("CivMars.GlassPlane", new GlassPlane()); - GameRegystry.RegisterItem("CivMars.IronPipe", new IronPipe()); - //GameRegystry.RegisterItem("CivMars.StoneBrick", new StoneBrick()); - //GameRegystry.RegisterItem("CivMars.InteriorPlate", new InteriorPlate()); - //GameRegystry.RegisterItem("CivMars.Roof", new Roof()); - //GameRegystry.RegisterItem("CuvMars.ControlCircuit", new ControlCircuit()); - //GameRegystry.RegisterItem("CuvMars.Piston", new Piston()); - //GameRegystry.RegisterItem("CuvMars.OxygenTank", new OxygenTank()); - - GameObject[] goBuild = Resources.LoadAll("Buildings"); - - foreach (GameObject item in goBuild) - { - IRegystratabe a = item.GetComponent(); - - if (a != null) - { - a.Regystrate(); - } - } - - GameObject[] goTiles = Resources.LoadAll("GeneratedTiles"); - - foreach (GameObject item in goTiles) - { - IRegystratabe a = item.GetComponent(); - - if (a != null) - { - a.Regystrate(); - } - } - } - - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; +using UnityEngine; + +namespace CivMars +{ + [Mod] + public static class CivMarsInit + { + public const string ModSpace = "CivMars"; + public const string BlockSpace = "CivMars.block"; + public const string ItemSpace = "CivMars.item"; + + [ModInit] + public static void Init() + { + GameRegystry.RegisterItem("CivMars.IronIngot", new IronIngot()); + GameRegystry.RegisterItem("CivMars.IronPlate", new IronPlate()); + GameRegystry.RegisterItem("CivMars.GlassPlane", new GlassPlane()); + GameRegystry.RegisterItem("CivMars.IronPipe", new IronPipe()); + //GameRegystry.RegisterItem("CivMars.StoneBrick", new StoneBrick()); + //GameRegystry.RegisterItem("CivMars.InteriorPlate", new InteriorPlate()); + //GameRegystry.RegisterItem("CivMars.Roof", new Roof()); + //GameRegystry.RegisterItem("CuvMars.ControlCircuit", new ControlCircuit()); + //GameRegystry.RegisterItem("CuvMars.Piston", new Piston()); + //GameRegystry.RegisterItem("CuvMars.OxygenTank", new OxygenTank()); + + GameObject[] goBuild = Resources.LoadAll("Buildings"); + + foreach (GameObject item in goBuild) + { + IRegystratabe a = item.GetComponent(); + + if (a != null) + { + a.Regystrate(); + } + } + + GameObject[] goTiles = Resources.LoadAll("GeneratedTiles"); + + foreach (GameObject item in goTiles) + { + IRegystratabe a = item.GetComponent(); + + if (a != null) + { + a.Regystrate(); + } + } + } + + + } + } \ No newline at end of file diff --git a/Assets/CivMarsInit.cs.meta b/Assets/CivMars/CivMarsInit.cs.meta similarity index 100% rename from Assets/CivMarsInit.cs.meta rename to Assets/CivMars/CivMarsInit.cs.meta diff --git a/Assets/CivMars/ClassDiagram1.cd b/Assets/CivMars/ClassDiagram1.cd new file mode 100644 index 0000000..aacebb5 --- /dev/null +++ b/Assets/CivMars/ClassDiagram1.cd @@ -0,0 +1,396 @@ + + + + + + AAIAAKAoCBAAkCAAACAAhAQQghAAAQACBACAAAGASEA= + Assets\CivMars\Buildings\Chest.cs + + + + + + + AAYAYCAgCDAAkGAABCQAhAgShhEAAAAABQCAAACASEA= + Assets\CivMars\Buildings\Furnace.cs + + + + + + + AAYAACAgCCAAkCAAAAAAhAAQwhAAAAAABQDCAAAASAA= + Assets\CivMars\Buildings\GreenHouse.cs + + + + + + + AAIAEKAgABAAkCAAACAChAQAgAAAAQgCFAAAAACASEA= + Assets\CivMars\Buildings\MainBuilding.cs + + + + + + + AA4BoCAgCBAAkCAAACAghAAQghEABAAIRQCAAACASEA= + Assets\CivMars\Buildings\Miner.cs + + + + + + + AAYAYCAgCDAAkGAABCQAhAgShhEAAAAABQCAAACASEA= + Assets\CivMars\Buildings\Press.cs + + + + + + + AQAAACAAAAAAAAAAAAAAAAAgAAAAAAAAAAACAAAAAAA= + Assets\CivMars\CivMarsInit.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\CopperIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\GoldIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\IronIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\Resin.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\SiliconRod.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\ControllChip.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\RadioCircuit.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\RadioTransmitterChip.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Circuits\ControlCircuit.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\ElctricalParts\Transistor.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\GlassPLane.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\InteriorPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\IronPipe.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\CoalOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Ore\CopperOre.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Ore\GoldOre.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\IronOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\SandOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\StoneOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\UraniumOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\OxygenTank.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Piston.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Plates\IronPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Plates\PlasticPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Roof.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\StoneBrick.cs + + + + + + + AAAAAAAAQAAAAABAAAAAAQAAAAAAAAAAAAAAAAAAAAQ= + Assets\CivMars\NeedToBeImplemented\Old\Generato.cs + + + + + + AAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Old\Oxigeneration.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\CoalOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\IronOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\SandTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\StoneOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\UraniumOreTile.cs + + + + + + EEQACAAAACAAhABAAgAAAAQAICACgEEAUEAEAACACEA= + Assets\CivMars\Buildings\PlanedBuilding.cs + + + + + + + ABAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAEA= + Assets\CivMars\Buildings\Tiled.cs + + + + + + AAJAAAAAAAAAAAAAAAAABAAAAAAEggAAAAAAAAAAAAA= + Assets\CivMars\Items\Item.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Sapling.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Wood.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Food.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Module.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\OxigenRecoverer.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\RefrinedUranium.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Resource.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Tool.cs + + + + + + AIIIgIAgEAAAgAAAAAAAIgAAAEAAgIAAAAAAAEAACAI= + Assets\CivMars\Ores\OreTile.cs + + + + + \ No newline at end of file diff --git a/Assets/CivMars/ClassDiagram1.cd.meta b/Assets/CivMars/ClassDiagram1.cd.meta new file mode 100644 index 0000000..aaceb53 --- /dev/null +++ b/Assets/CivMars/ClassDiagram1.cd.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ad004385df306a4681f1c8dd9dda01c +timeCreated: 1450798790 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMars/Items/BasicMaterials/CopperIngot.cs b/Assets/CivMars/Items/BasicMaterials/CopperIngot.cs index 355ea0d..bb4530d 100644 --- a/Assets/CivMars/Items/BasicMaterials/CopperIngot.cs +++ b/Assets/CivMars/Items/BasicMaterials/CopperIngot.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class CopperIngot : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/BasicMaterials/GoldIngot.cs b/Assets/CivMars/Items/BasicMaterials/GoldIngot.cs index bf4c426..0b1c91d 100644 --- a/Assets/CivMars/Items/BasicMaterials/GoldIngot.cs +++ b/Assets/CivMars/Items/BasicMaterials/GoldIngot.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class GoldIngot : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/BasicMaterials/IronIngot.cs b/Assets/CivMars/Items/BasicMaterials/IronIngot.cs index 13aefba..91c22d5 100644 --- a/Assets/CivMars/Items/BasicMaterials/IronIngot.cs +++ b/Assets/CivMars/Items/BasicMaterials/IronIngot.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars { diff --git a/Assets/CivMars/Items/BasicMaterials/Resin.cs b/Assets/CivMars/Items/BasicMaterials/Resin.cs index 53f84f8..6e8f9b0 100644 --- a/Assets/CivMars/Items/BasicMaterials/Resin.cs +++ b/Assets/CivMars/Items/BasicMaterials/Resin.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class Resin : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs b/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs index 76f947f..2fc56cd 100644 --- a/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs +++ b/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/GUI/GuiType.cs.meta b/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs.meta similarity index 76% rename from Assets/GUI/GuiType.cs.meta rename to Assets/CivMars/Items/BasicMaterials/SiliconRod.cs.meta index 3ad1e21..b69768e 100644 --- a/Assets/GUI/GuiType.cs.meta +++ b/Assets/CivMars/Items/BasicMaterials/SiliconRod.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: fedc9a76fb009c2458f2e42f356ab089 -timeCreated: 1445851654 +guid: 5b765257c0b446540ba3836c77ddb198 +timeCreated: 1450709420 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/CivMars/Items/Chips/ControllChip.cs b/Assets/CivMars/Items/Chips/ControllChip.cs index bb3ff1f..db87d68 100644 --- a/Assets/CivMars/Items/Chips/ControllChip.cs +++ b/Assets/CivMars/Items/Chips/ControllChip.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class ControllChip : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/Chips/RadioTransmitterChip.cs b/Assets/CivMars/Items/Chips/RadioTransmitterChip.cs new file mode 100644 index 0000000..1614b61 --- /dev/null +++ b/Assets/CivMars/Items/Chips/RadioTransmitterChip.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; + +namespace CivMars +{ + class RadioTransmitterChip : Item, IRegystratabe + { + public string name = "RadioTransmitterChip"; + + + public RadioTransmitterChip(int am) : base(am, 30) + { + texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public RadioTransmitterChip() + { + texture = GameRegystry.GetSprite("Texturas/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public void Regystrate() + { + Item[] a = { new SiliconRod(1), new CopperIngot(1) }; + Recipe r = new Recipe("CivMars.Press", a, new RadioTransmitterChip(1), 100); + GameRegystry.RegisterRecepie(r.buildingID, r); + } + } +} diff --git a/Assets/GUI/ActionButton.cs.meta b/Assets/CivMars/Items/Chips/RadioTransmitterChip.cs.meta similarity index 76% rename from Assets/GUI/ActionButton.cs.meta rename to Assets/CivMars/Items/Chips/RadioTransmitterChip.cs.meta index 8e7a3dd..4714afb 100644 --- a/Assets/GUI/ActionButton.cs.meta +++ b/Assets/CivMars/Items/Chips/RadioTransmitterChip.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: a87c14b7ad1ee1543ba1ee792499bde2 -timeCreated: 1438066433 +guid: 137db532b31ab784281b01387bc2a8a1 +timeCreated: 1450709420 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/CivMars/Items/Circuits/ControlCircuit.cs b/Assets/CivMars/Items/Circuits/ControlCircuit.cs index c0067ca..0eafb73 100644 --- a/Assets/CivMars/Items/Circuits/ControlCircuit.cs +++ b/Assets/CivMars/Items/Circuits/ControlCircuit.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class ControlCircuit : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/Circuits/RadioCircuit.cs b/Assets/CivMars/Items/Circuits/RadioCircuit.cs new file mode 100644 index 0000000..d4caf90 --- /dev/null +++ b/Assets/CivMars/Items/Circuits/RadioCircuit.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; + +namespace CivMars +{ + class RadioCircuit : Item, IRegystratabe + { + public string name = "ControlCircuit"; + + + public RadioCircuit(int am) : base(am, 30) + { + texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public RadioCircuit() + { + texture = GameRegystry.GetSprite("Texturas/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public void Regystrate() + { + Item[] a = { new RadioTransmitterChip(1), new Transistor(5) }; + Recipe r = new Recipe("CivMars.Press", a, new SiliconRod(1), 100); + GameRegystry.RegisterRecepie(r.buildingID, r); + } + } +} diff --git a/Assets/NeedToBeImplemented/Old/WareHouse.cs.meta b/Assets/CivMars/Items/Circuits/RadioCircuit.cs.meta similarity index 76% rename from Assets/NeedToBeImplemented/Old/WareHouse.cs.meta rename to Assets/CivMars/Items/Circuits/RadioCircuit.cs.meta index b02c36e..0d57d82 100644 --- a/Assets/NeedToBeImplemented/Old/WareHouse.cs.meta +++ b/Assets/CivMars/Items/Circuits/RadioCircuit.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 3e24e35b988c3cb47b45ac743d99c73f -timeCreated: 1441725317 +guid: d82928a0d51a17c45800fe4f47353226 +timeCreated: 1450709425 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/CivMars/Items/ElctricalParts.meta b/Assets/CivMars/Items/ElctricalParts.meta new file mode 100644 index 0000000..d7569d4 --- /dev/null +++ b/Assets/CivMars/Items/ElctricalParts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a12abc73117771b4daefa90e74527247 +folderAsset: yes +timeCreated: 1450709420 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMars/Items/ElctricalParts/Transistor.cs b/Assets/CivMars/Items/ElctricalParts/Transistor.cs new file mode 100644 index 0000000..63141f3 --- /dev/null +++ b/Assets/CivMars/Items/ElctricalParts/Transistor.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; + +namespace CivMars +{ + class Transistor : Item, IRegystratabe + { + public string name = "Transistor"; + + + public Transistor(int am) : base(am, 30) + { + texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public Transistor() + { + texture = GameRegystry.GetSprite("Texturas/Items/", "CivMars.ControlCircuit"); + maxStackSize = 30; + } + + public void Regystrate() + { + Item[] a = { new SiliconRod(2)}; + Recipe r = new Recipe("CivMars.Press", a, new Transistor(1), 100); + GameRegystry.RegisterRecepie(r.buildingID, r); + } + } +} diff --git a/Assets/GUI/Buildables/BuildableDrawElement.cs.meta b/Assets/CivMars/Items/ElctricalParts/Transistor.cs.meta similarity index 76% rename from Assets/GUI/Buildables/BuildableDrawElement.cs.meta rename to Assets/CivMars/Items/ElctricalParts/Transistor.cs.meta index 55dbf05..a522684 100644 --- a/Assets/GUI/Buildables/BuildableDrawElement.cs.meta +++ b/Assets/CivMars/Items/ElctricalParts/Transistor.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 78efe7ee73e8ddd4aaccc45fa6e195f0 -timeCreated: 1441725317 +guid: 851e5bc087d2897439ff7adb92f96ea5 +timeCreated: 1450709420 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/CivMars/Items/GlassPLane.cs b/Assets/CivMars/Items/GlassPLane.cs index ce3c7a2..988e884 100644 --- a/Assets/CivMars/Items/GlassPLane.cs +++ b/Assets/CivMars/Items/GlassPLane.cs @@ -2,35 +2,36 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars -{ -public class GlassPlane:Item, IRegystratabe { - public string name = "GlassPlane"; + public class GlassPlane : Item, IRegystratabe + { + new public string name = "GlassPlane"; - public GlassPlane(int am) : base(am, 30) - { - texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.GlassPlane"); - maxStackSize = 30; - } + public GlassPlane(int am) : base(am, 30) + { + texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.GlassPlane"); + maxStackSize = 30; + } - public GlassPlane() - { - texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.GlassPlane"); - maxStackSize = 30; - } + public GlassPlane() + { + texture = GameRegystry.GetSprite("Textures/Items/", "CivMars.GlassPlane"); + maxStackSize = 30; + } - public void Regystrate() - { + public void Regystrate() + { - Item[] a = { new SandOre(4) }; - Recipe r = new Recipe("CivMars.Furnace", a, new GlassPlane(1), 50); - GameRegystry.RegisterRecepie(r.buildingID, r); - } + Item[] a = { new SandOre(4) }; + Recipe r = new Recipe("CivMars.Furnace", a, new GlassPlane(1), 50); + GameRegystry.RegisterRecepie(r.buildingID, r); + } -} + } } \ No newline at end of file diff --git a/Assets/CivMars/Items/InteriorPlate.cs b/Assets/CivMars/Items/InteriorPlate.cs index 3fa1edb..a3d4b01 100644 --- a/Assets/CivMars/Items/InteriorPlate.cs +++ b/Assets/CivMars/Items/InteriorPlate.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars diff --git a/Assets/CivMars/Items/IronPipe.cs b/Assets/CivMars/Items/IronPipe.cs index 6ec376a..411f383 100644 --- a/Assets/CivMars/Items/IronPipe.cs +++ b/Assets/CivMars/Items/IronPipe.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars diff --git a/Assets/CivMars/Items/Item.cs b/Assets/CivMars/Items/Item.cs index e5aecc6..860e2e5 100644 --- a/Assets/CivMars/Items/Item.cs +++ b/Assets/CivMars/Items/Item.cs @@ -6,6 +6,7 @@ public class Item { + public string name; public int amount; public int maxStackSize; public Sprite texture; diff --git a/Assets/CivMars/Items/Ore/CopperOre.cs b/Assets/CivMars/Items/Ore/CopperOre.cs index 654f971..4bad7c2 100644 --- a/Assets/CivMars/Items/Ore/CopperOre.cs +++ b/Assets/CivMars/Items/Ore/CopperOre.cs @@ -1,4 +1,6 @@  +using CivMarsEngine; + namespace CivMars { class CopperOre : Item, IRegystratabe diff --git a/Assets/CivMars/Items/Ore/GoldOre.cs b/Assets/CivMars/Items/Ore/GoldOre.cs index dc1edb8..c8a9772 100644 --- a/Assets/CivMars/Items/Ore/GoldOre.cs +++ b/Assets/CivMars/Items/Ore/GoldOre.cs @@ -1,4 +1,6 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class GoldOre : Item, IRegystratabe { diff --git a/Assets/CivMars/Items/OxygenTank.cs b/Assets/CivMars/Items/OxygenTank.cs index 8fc0e24..6b7db26 100644 --- a/Assets/CivMars/Items/OxygenTank.cs +++ b/Assets/CivMars/Items/OxygenTank.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars { diff --git a/Assets/CivMars/Items/Piston.cs b/Assets/CivMars/Items/Piston.cs index 88d5b57..4bf7764 100644 --- a/Assets/CivMars/Items/Piston.cs +++ b/Assets/CivMars/Items/Piston.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars { diff --git a/Assets/CivMars/Items/Plates/IronPlate.cs b/Assets/CivMars/Items/Plates/IronPlate.cs index 7df5b94..6e7eca3 100644 --- a/Assets/CivMars/Items/Plates/IronPlate.cs +++ b/Assets/CivMars/Items/Plates/IronPlate.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; diff --git a/Assets/CivMars/Items/Plates/PlasticPlate.cs b/Assets/CivMars/Items/Plates/PlasticPlate.cs index 82bf973..5e30883 100644 --- a/Assets/CivMars/Items/Plates/PlasticPlate.cs +++ b/Assets/CivMars/Items/Plates/PlasticPlate.cs @@ -1,9 +1,11 @@ -namespace CivMars +using CivMarsEngine; + +namespace CivMars { class PlasticPlate : Item, IRegystratabe { - public string name = "ControlCircuit"; + new public string name = "ControlCircuit"; public PlasticPlate(int am) : base(am, 30) diff --git a/Assets/CivMars/Items/Roof.cs b/Assets/CivMars/Items/Roof.cs index b4ba694..6c966ae 100644 --- a/Assets/CivMars/Items/Roof.cs +++ b/Assets/CivMars/Items/Roof.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars diff --git a/Assets/CivMars/Items/Sapling.cs b/Assets/CivMars/Items/Sapling.cs index 2c6a76c..a91deb3 100644 --- a/Assets/CivMars/Items/Sapling.cs +++ b/Assets/CivMars/Items/Sapling.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; class Sapling : Item diff --git a/Assets/CivMars/Items/StoneBrick.cs b/Assets/CivMars/Items/StoneBrick.cs index cd20ed8..a4d8463 100644 --- a/Assets/CivMars/Items/StoneBrick.cs +++ b/Assets/CivMars/Items/StoneBrick.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; namespace CivMars { public class StoneBrick : Item, IRegystratabe { - public string name = "StoneBrick"; + new public string name = "StoneBrick"; public StoneBrick(int am) : base(am, 100) diff --git a/Assets/CivMars/Items/Wood.cs b/Assets/CivMars/Items/Wood.cs index f5492e5..3388366 100644 --- a/Assets/CivMars/Items/Wood.cs +++ b/Assets/CivMars/Items/Wood.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; using UnityEngine; class Wood : Item diff --git a/Assets/NeedToBeImplemented.meta b/Assets/CivMars/NeedToBeImplemented.meta similarity index 100% rename from Assets/NeedToBeImplemented.meta rename to Assets/CivMars/NeedToBeImplemented.meta diff --git a/Assets/NeedToBeImplemented/Food.cs b/Assets/CivMars/NeedToBeImplemented/Food.cs similarity index 92% rename from Assets/NeedToBeImplemented/Food.cs rename to Assets/CivMars/NeedToBeImplemented/Food.cs index 8f860de..39d2ec2 100644 --- a/Assets/NeedToBeImplemented/Food.cs +++ b/Assets/CivMars/NeedToBeImplemented/Food.cs @@ -1,10 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - public class Food:Item - { - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + public class Food:Item + { + } + diff --git a/Assets/NeedToBeImplemented/Food.cs.meta b/Assets/CivMars/NeedToBeImplemented/Food.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Food.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Food.cs.meta diff --git a/Assets/NeedToBeImplemented/Module.cs b/Assets/CivMars/NeedToBeImplemented/Module.cs similarity index 94% rename from Assets/NeedToBeImplemented/Module.cs rename to Assets/CivMars/NeedToBeImplemented/Module.cs index a2e707f..8430735 100644 --- a/Assets/NeedToBeImplemented/Module.cs +++ b/Assets/CivMars/NeedToBeImplemented/Module.cs @@ -1,8 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public class Module -{ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +public class Module +{ } \ No newline at end of file diff --git a/Assets/NeedToBeImplemented/Module.cs.meta b/Assets/CivMars/NeedToBeImplemented/Module.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Module.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Module.cs.meta diff --git a/Assets/NeedToBeImplemented/Old.meta b/Assets/CivMars/NeedToBeImplemented/Old.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old.meta rename to Assets/CivMars/NeedToBeImplemented/Old.meta diff --git a/Assets/NeedToBeImplemented/Old/Assembler.cs b/Assets/CivMars/NeedToBeImplemented/Old/Assembler.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/Assembler.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Assembler.cs index 2ec9c1b..55c2cbe 100644 --- a/Assets/NeedToBeImplemented/Old/Assembler.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Assembler.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - //public class Assembler:Producer - //{ - // public int speed; - - // public void Production() - // { - // throw new System.NotImplementedException(); - // } - //} - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + //public class Assembler:Producer + //{ + // public int speed; + + // public void Production() + // { + // throw new System.NotImplementedException(); + // } + //} + diff --git a/Assets/NeedToBeImplemented/Old/Assembler.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Assembler.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Assembler.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Assembler.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/Furnace.cs b/Assets/CivMars/NeedToBeImplemented/Old/Furnace.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/Furnace.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Furnace.cs index f86964c..0e6b676 100644 --- a/Assets/NeedToBeImplemented/Old/Furnace.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Furnace.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - //public class Furnace:Producer - //{ - // public int speed; - - // public void Production() - // { - // throw new System.NotImplementedException(); - // } - //} - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + //public class Furnace:Producer + //{ + // public int speed; + + // public void Production() + // { + // throw new System.NotImplementedException(); + // } + //} + diff --git a/Assets/NeedToBeImplemented/Old/Furnace.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Furnace.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Furnace.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Furnace.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/Generato.cs b/Assets/CivMars/NeedToBeImplemented/Old/Generato.cs similarity index 93% rename from Assets/NeedToBeImplemented/Old/Generato.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Generato.cs index d271fb7..c83158c 100644 --- a/Assets/NeedToBeImplemented/Old/Generato.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Generato.cs @@ -1,28 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace CivMars -{ - public class Generator : Building - { - - public MainBuilding main; - public int internalsorage; - - public void Gen() - { } - - - public void Transfer() - { - if (this.internalsorage > 1) - { - //main.Inventory =+ this.internalsorage; - } - } - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; + +namespace CivMars +{ + public class Generator : Building + { + + public MainBuilding main; + public int internalsorage; + + public void Gen() + { } + + + public void Transfer() + { + if (this.internalsorage > 1) + { + //main.Inventory =+ this.internalsorage; + } + } + + } + } \ No newline at end of file diff --git a/Assets/NeedToBeImplemented/Old/Generato.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Generato.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Generato.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Generato.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/Miner.meta b/Assets/CivMars/NeedToBeImplemented/Old/Miner.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Miner.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Miner.meta diff --git a/Assets/NeedToBeImplemented/Old/Miner/SpecMine.cs b/Assets/CivMars/NeedToBeImplemented/Old/Miner/SpecMine.cs similarity index 92% rename from Assets/NeedToBeImplemented/Old/Miner/SpecMine.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Miner/SpecMine.cs index 1324166..faa0bf5 100644 --- a/Assets/NeedToBeImplemented/Old/Miner/SpecMine.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Miner/SpecMine.cs @@ -1,10 +1,10 @@ -/* - public class SpecMine : Miner - { - //public OreType type; - public int capacity; - - - } - +/* + public class SpecMine : Miner + { + //public OreType type; + public int capacity; + + + } + */ \ No newline at end of file diff --git a/Assets/NeedToBeImplemented/Old/Miner/SpecMine.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Miner/SpecMine.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Miner/SpecMine.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Miner/SpecMine.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/NuclearReactor.cs b/Assets/CivMars/NeedToBeImplemented/Old/NuclearReactor.cs similarity index 93% rename from Assets/NeedToBeImplemented/Old/NuclearReactor.cs rename to Assets/CivMars/NeedToBeImplemented/Old/NuclearReactor.cs index 768f312..57337e3 100644 --- a/Assets/NeedToBeImplemented/Old/NuclearReactor.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/NuclearReactor.cs @@ -1,12 +1,12 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; - - - -// public class NuclearReactor:Building -// { - -// } - +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; + + + +// public class NuclearReactor:Building +// { + +// } + diff --git a/Assets/NeedToBeImplemented/Old/NuclearReactor.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/NuclearReactor.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/NuclearReactor.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/NuclearReactor.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/Oxigeneration.cs b/Assets/CivMars/NeedToBeImplemented/Old/Oxigeneration.cs similarity index 93% rename from Assets/NeedToBeImplemented/Old/Oxigeneration.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Oxigeneration.cs index 7edc702..15c13c7 100644 --- a/Assets/NeedToBeImplemented/Old/Oxigeneration.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Oxigeneration.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - -namespace CivMars -{ - public class Oxigenerator : Generator - { - public int speed; - public int capacity; - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace CivMars +{ + public class Oxigenerator : Generator + { + public int speed; + public int capacity; + + } + } \ No newline at end of file diff --git a/Assets/NeedToBeImplemented/Old/Oxigeneration.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Oxigeneration.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Oxigeneration.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Oxigeneration.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/Producer.cs b/Assets/CivMars/NeedToBeImplemented/Old/Producer.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/Producer.cs rename to Assets/CivMars/NeedToBeImplemented/Old/Producer.cs index 2dea727..86d7416 100644 --- a/Assets/NeedToBeImplemented/Old/Producer.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/Producer.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - //public class Producer:Building - //{ - // public void Production() - // { - // throw new System.NotImplementedException(); - // } - //} - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + //public class Producer:Building + //{ + // public void Production() + // { + // throw new System.NotImplementedException(); + // } + //} + diff --git a/Assets/NeedToBeImplemented/Old/Producer.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/Producer.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/Producer.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/Producer.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/ResearchFacility.cs b/Assets/CivMars/NeedToBeImplemented/Old/ResearchFacility.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/ResearchFacility.cs rename to Assets/CivMars/NeedToBeImplemented/Old/ResearchFacility.cs index 923787a..357d72d 100644 --- a/Assets/NeedToBeImplemented/Old/ResearchFacility.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/ResearchFacility.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - //public class ResearchFacility:Building - //{ - // private int researchspeed; - - // public void Research() - // { - // throw new System.NotImplementedException(); - // } - //} - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + //public class ResearchFacility:Building + //{ + // private int researchspeed; + + // public void Research() + // { + // throw new System.NotImplementedException(); + // } + //} + diff --git a/Assets/NeedToBeImplemented/Old/ResearchFacility.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/ResearchFacility.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/ResearchFacility.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/ResearchFacility.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/UniverzalMiner.cs b/Assets/CivMars/NeedToBeImplemented/Old/UniverzalMiner.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/UniverzalMiner.cs rename to Assets/CivMars/NeedToBeImplemented/Old/UniverzalMiner.cs index 216bfa6..72fae96 100644 --- a/Assets/NeedToBeImplemented/Old/UniverzalMiner.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/UniverzalMiner.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - /* - - public class UniverzalMiner:Miner - { - public int capacity; - public int speed; - //public OreType type; - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + /* + + public class UniverzalMiner:Miner + { + public int capacity; + public int speed; + //public OreType type; + + } + */ \ No newline at end of file diff --git a/Assets/NeedToBeImplemented/Old/UniverzalMiner.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/UniverzalMiner.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/UniverzalMiner.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/UniverzalMiner.cs.meta diff --git a/Assets/NeedToBeImplemented/Old/UraniumRefiner.cs b/Assets/CivMars/NeedToBeImplemented/Old/UraniumRefiner.cs similarity index 94% rename from Assets/NeedToBeImplemented/Old/UraniumRefiner.cs rename to Assets/CivMars/NeedToBeImplemented/Old/UraniumRefiner.cs index c51a212..22f0ba7 100644 --- a/Assets/NeedToBeImplemented/Old/UraniumRefiner.cs +++ b/Assets/CivMars/NeedToBeImplemented/Old/UraniumRefiner.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - //public class UraniumRefiner:Producer - //{ - // public int speed; - - // public void Production() - // { - // throw new System.NotImplementedException(); - // } - //} - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + //public class UraniumRefiner:Producer + //{ + // public int speed; + + // public void Production() + // { + // throw new System.NotImplementedException(); + // } + //} + diff --git a/Assets/NeedToBeImplemented/Old/UraniumRefiner.cs.meta b/Assets/CivMars/NeedToBeImplemented/Old/UraniumRefiner.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Old/UraniumRefiner.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Old/UraniumRefiner.cs.meta diff --git a/Assets/NeedToBeImplemented/OxigenRecoverer.cs b/Assets/CivMars/NeedToBeImplemented/OxigenRecoverer.cs similarity index 92% rename from Assets/NeedToBeImplemented/OxigenRecoverer.cs rename to Assets/CivMars/NeedToBeImplemented/OxigenRecoverer.cs index 96fd7c3..089aff4 100644 --- a/Assets/NeedToBeImplemented/OxigenRecoverer.cs +++ b/Assets/CivMars/NeedToBeImplemented/OxigenRecoverer.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - class OxigenRecoverer :Module - { - - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + class OxigenRecoverer :Module + { + + + } + diff --git a/Assets/NeedToBeImplemented/OxigenRecoverer.cs.meta b/Assets/CivMars/NeedToBeImplemented/OxigenRecoverer.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/OxigenRecoverer.cs.meta rename to Assets/CivMars/NeedToBeImplemented/OxigenRecoverer.cs.meta diff --git a/Assets/NeedToBeImplemented/RefrinedUranium.cs b/Assets/CivMars/NeedToBeImplemented/RefrinedUranium.cs similarity index 93% rename from Assets/NeedToBeImplemented/RefrinedUranium.cs rename to Assets/CivMars/NeedToBeImplemented/RefrinedUranium.cs index 6a02816..0ec460f 100644 --- a/Assets/NeedToBeImplemented/RefrinedUranium.cs +++ b/Assets/CivMars/NeedToBeImplemented/RefrinedUranium.cs @@ -1,13 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - public class RefrinedUranium:Item - { - public string name = "RefrinedUranium"; - - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + public class RefrinedUranium:Item + { + public string name = "RefrinedUranium"; + + } + diff --git a/Assets/NeedToBeImplemented/RefrinedUranium.cs.meta b/Assets/CivMars/NeedToBeImplemented/RefrinedUranium.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/RefrinedUranium.cs.meta rename to Assets/CivMars/NeedToBeImplemented/RefrinedUranium.cs.meta diff --git a/Assets/NeedToBeImplemented/Resource.cs b/Assets/CivMars/NeedToBeImplemented/Resource.cs similarity index 92% rename from Assets/NeedToBeImplemented/Resource.cs rename to Assets/CivMars/NeedToBeImplemented/Resource.cs index 773f40b..ad279f4 100644 --- a/Assets/NeedToBeImplemented/Resource.cs +++ b/Assets/CivMars/NeedToBeImplemented/Resource.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - public class Resource:Item - { - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + public class Resource:Item + { + } + diff --git a/Assets/NeedToBeImplemented/Resource.cs.meta b/Assets/CivMars/NeedToBeImplemented/Resource.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Resource.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Resource.cs.meta diff --git a/Assets/NeedToBeImplemented/Tool.cs b/Assets/CivMars/NeedToBeImplemented/Tool.cs similarity index 92% rename from Assets/NeedToBeImplemented/Tool.cs rename to Assets/CivMars/NeedToBeImplemented/Tool.cs index 64d14ab..57577b6 100644 --- a/Assets/NeedToBeImplemented/Tool.cs +++ b/Assets/CivMars/NeedToBeImplemented/Tool.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - - - public class Tool:Item - { - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + + + public class Tool:Item + { + } + diff --git a/Assets/NeedToBeImplemented/Tool.cs.meta b/Assets/CivMars/NeedToBeImplemented/Tool.cs.meta similarity index 100% rename from Assets/NeedToBeImplemented/Tool.cs.meta rename to Assets/CivMars/NeedToBeImplemented/Tool.cs.meta diff --git a/Assets/CivMars/Ores/CoalOreTile.cs b/Assets/CivMars/Ores/CoalOreTile.cs index ea8f026..d481534 100644 --- a/Assets/CivMars/Ores/CoalOreTile.cs +++ b/Assets/CivMars/Ores/CoalOreTile.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/CivMars/Ores/IronOreTile.cs b/Assets/CivMars/Ores/IronOreTile.cs index 0e0d8f6..77e377e 100644 --- a/Assets/CivMars/Ores/IronOreTile.cs +++ b/Assets/CivMars/Ores/IronOreTile.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections; using System; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/CivMars/Ores/OreTile.cs b/Assets/CivMars/Ores/OreTile.cs index 3c5aafb..7b6ab69 100644 --- a/Assets/CivMars/Ores/OreTile.cs +++ b/Assets/CivMars/Ores/OreTile.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections; using System; +using CivMarsEngine; public class OreTile : Tiled, IRegystratabe, IWorldGen, ISaveble { diff --git a/Assets/CivMars/Ores/SandTile.cs b/Assets/CivMars/Ores/SandTile.cs index 958e4e5..4a48885 100644 --- a/Assets/CivMars/Ores/SandTile.cs +++ b/Assets/CivMars/Ores/SandTile.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections; using System; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/CivMars/Ores/StoneOreTile.cs b/Assets/CivMars/Ores/StoneOreTile.cs index 3269202..ebbc068 100644 --- a/Assets/CivMars/Ores/StoneOreTile.cs +++ b/Assets/CivMars/Ores/StoneOreTile.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections; using System; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/CivMars/Ores/UraniumOreTile.cs b/Assets/CivMars/Ores/UraniumOreTile.cs index b219d9e..c55d85e 100644 --- a/Assets/CivMars/Ores/UraniumOreTile.cs +++ b/Assets/CivMars/Ores/UraniumOreTile.cs @@ -1,6 +1,7 @@ using UnityEngine; using System.Collections; using System; +using CivMarsEngine; namespace CivMars { diff --git a/Assets/CivMarsEngine.meta b/Assets/CivMarsEngine.meta new file mode 100644 index 0000000..8f01275 --- /dev/null +++ b/Assets/CivMarsEngine.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6b487f7f5a9df494e9b0eb9d4718bb3b +folderAsset: yes +timeCreated: 1450796720 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/Building.cs b/Assets/CivMarsEngine/Building.cs new file mode 100644 index 0000000..7dd604f --- /dev/null +++ b/Assets/CivMarsEngine/Building.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace CivMarsEngine +{ + + [AddComponentMenu("Buildings/Building")] + public class Building : Tiled, ISaveble + { + public string ID; + + //public List buildingMaterials; + + public GameObject Graphicks; + public bool guion; + + public override void Awake() + { + base.Awake(); + } + + public void PositionUpdate() + { + Graphicks.SetActive(false); + this.Graphicks.transform.position = Vector3.zero; + } + + + + #region ISaveble + + public virtual SavedTile Save() + { + SavedTile s = new SavedTile(ID); + return s; + } + + public void Load(SavedTile data) + { + throw new NotImplementedException(); + } + + public virtual GameObject GetPrefab() + { + throw new NotImplementedException(); + } + #endregion + } +} \ No newline at end of file diff --git a/Assets/CivMars/Buildings/Building.cs.meta b/Assets/CivMarsEngine/Building.cs.meta similarity index 100% rename from Assets/CivMars/Buildings/Building.cs.meta rename to Assets/CivMarsEngine/Building.cs.meta diff --git a/Assets/CivMarsEngine/BuildingWGUI.cs b/Assets/CivMarsEngine/BuildingWGUI.cs new file mode 100644 index 0000000..9b93d74 --- /dev/null +++ b/Assets/CivMarsEngine/BuildingWGUI.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CivMarsEngine; +using UnityEngine.EventSystems; + +namespace CivMarsEngine +{ + public class BuildingWGUI : Building, IHasGui + { + + #region IhasGui + public void TogelGui() + { + if (!guion) + { + if (GameCon.AlloweGUI(this)) + { + Open(); + } + } + else + { + GameCon.CloseGUI(this); + Close(); + } + } + + public virtual void Open() + { + guion = true; + Graphicks.SetActive(true); + } + + public virtual void Close() + { + guion = false; + Graphicks.SetActive(false); + } + + public int ClosingLevel() + { + return 1; + } + + public void OnPointerClick(PointerEventData eventData) + { + if (!eventData.rawPointerPress.transform.IsChildOf(Graphicks.transform)) + TogelGui(); + } + #endregion + + } +} diff --git a/Assets/CivMarsEngine/BuildingWGUI.cs.meta b/Assets/CivMarsEngine/BuildingWGUI.cs.meta new file mode 100644 index 0000000..b6abb66 --- /dev/null +++ b/Assets/CivMarsEngine/BuildingWGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e9e07dee708e124f8d3319e398055d7 +timeCreated: 1450796720 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Camera.meta b/Assets/CivMarsEngine/Camera.meta similarity index 100% rename from Assets/Camera.meta rename to Assets/CivMarsEngine/Camera.meta diff --git a/Assets/Camera/CameraChase.cs b/Assets/CivMarsEngine/Camera/CameraChase.cs similarity index 61% rename from Assets/Camera/CameraChase.cs rename to Assets/CivMarsEngine/Camera/CameraChase.cs index 95e4116..ed26297 100644 --- a/Assets/Camera/CameraChase.cs +++ b/Assets/CivMarsEngine/Camera/CameraChase.cs @@ -1,198 +1,200 @@ -using UnityEngine; -using System.Collections; - - - -//[AddComponentMenu("Camera/CameraChase")] -//public class CameraChase : MonoBehaviour -//{ - - -// public Transform chase; -// public Rect area; -// public bool loaded = false; - -// public RectTransform rectTrans; - -// void Start() -// { -// } - -// // Use this for initialization -// public void MapLoaded() -// { -// GameController GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); -// if (GameCon.map == null) -// Debug.LogError("Can't find GameController"); - -// chase = GameObject.FindGameObjectWithTag("Player").transform; -// area = new Rect(); - -// /* -// area.x = 10.50f; -// area.y = -3f - (GameCon.map.mapHeight * 1.0f - 6f); -// area.width = GameCon.map.mapHeight * 1.0f - 11f; -// area.height = GameCon.map.mapHeight * 1.0f - 8f; -// */ - -// Debug.Log(Camera.main.rect); - -// area.x = 0 + (Camera.main.rect.x / 2); -// area.y = 0f - (GameCon.map.mapHeight); -// area.width = (GameCon.map.mapHeight); -// area.height = (GameCon.map.mapHeight); - - -// Debug.Log(area); -// loaded = true; -// } - -// // Update is called once per frame -// void Update() -// { -// if (chase == null) -// { - - - -// return; - -// } -// if (loaded) -// { -// if (area.Contains(new Vector2(chase.position.x, chase.position.y))) -// { -// transform.position = chase.position + Vector3.back * 10; - -// } -// else if (chase.position.x > area.xMax && chase.position.y > area.yMax) -// { -// transform.position = new Vector3(area.xMax, area.yMax); -// } -// else if (chase.position.x > area.xMax && chase.position.y < area.yMin) -// { -// transform.position = new Vector3(area.xMax, area.yMin); -// } -// else if (chase.position.x < area.xMin && chase.position.y > area.yMax) -// { -// transform.position = new Vector3(area.xMin, area.yMax); -// } -// else if (chase.position.x < area.xMin && chase.position.y < area.yMin) -// { -// transform.position = new Vector3(area.xMin, area.yMin); - -// } -// else if (chase.position.x < area.xMin && area.yMax > chase.position.y && chase.position.y > area.yMin) -// { -// transform.position = new Vector3(area.xMin, chase.position.y); -// } -// else if (chase.position.x > area.xMax && area.yMax > chase.position.y && chase.position.y > area.yMin) -// { -// transform.position = new Vector3(area.xMax, chase.position.y); -// } -// else if (area.xMax > chase.position.x && chase.position.x > area.xMin && chase.position.y < area.yMin) -// { -// transform.position = new Vector3(chase.position.x, area.yMin); -// } -// else if (area.xMax > chase.position.x && chase.position.x > area.xMin && chase.position.y > area.yMax) -// { -// transform.position = new Vector3(chase.position.x, area.yMax); -// } -// transform.position = new Vector3(transform.position.x, transform.position.y, -10); - -// } -// } -//} - - -[AddComponentMenu("Camera/CameraChase")] -public class CameraChase : MonoBehaviour -{ - - - public Transform chase; - public bool loaded = false; - - public float eventHorizont = 1.5f; - - public RectTransform rectTrans; - - Camera CameraScript; - GameController GameCon; - - void Start() - { - - - } - - // Use this for initialization - public void MapLoaded() - { - - CameraScript = this.GetComponent(); - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - - if (GameCon.map == null) - { - Debug.LogError("Can't find GameController"); - Debug.Break(); - } - - loaded = true; - } - - // Update is called once per frame - void Update() - { - if (chase == null) - { - - return; - - } - if (loaded) - { - float xCamPos = transform.position.x; - float yCamPos = -1 * transform.position.y; - - float xPos = chase.transform.position.x; - float yPos = -1 * chase.transform.position.y; - - float xCameraH = CameraScript.orthographicSize * (Screen.width / Screen.height) * (1 - CameraScript.rect.x); - float yCameraH = CameraScript.orthographicSize * (1-CameraScript.rect.y); - - //transform.position = new Vector3(Mathf.Clamp(xPos, xCameraH, GameCon.map.mapHeight - xCameraH),-1 * Mathf.Clamp(-1*yPos, yCameraH, GameCon.map.mapHeight - yCameraH), transform.position.z); - transform.position = new Vector3( - Mathf.Clamp( - xCamPos + OutRangeClamp(xPos, xCamPos - xCameraH / eventHorizont, xCamPos + xCameraH / eventHorizont), - xCameraH, - GameCon.map.mapHeight - xCameraH - ), - - -1 * Mathf.Clamp( - yCamPos + OutRangeClamp(yPos, yCamPos - yCameraH / eventHorizont, yCamPos + yCameraH / eventHorizont), - yCameraH, - GameCon.map.mapHeight - yCameraH - ), - transform.position.z); - } - } - - float OutRangeClamp(float value, float Min, float Max) - { - if (value < Min) - { - //Debug.Log("if"); - return value - Min; - } - else if (value > Max) - { - //Debug.Log("else"); - - return value - Max; - } - return 0; - } -} - +using UnityEngine; +using System.Collections; + + + +//[AddComponentMenu("Camera/CameraChase")] +//public class CameraChase : MonoBehaviour +//{ + + +// public Transform chase; +// public Rect area; +// public bool loaded = false; + +// public RectTransform rectTrans; + +// void Start() +// { +// } + +// // Use this for initialization +// public void MapLoaded() +// { +// GameController GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); +// if (GameCon.map == null) +// Debug.LogError("Can't find GameController"); + +// chase = GameObject.FindGameObjectWithTag("Player").transform; +// area = new Rect(); + +// /* +// area.x = 10.50f; +// area.y = -3f - (GameCon.map.mapHeight * 1.0f - 6f); +// area.width = GameCon.map.mapHeight * 1.0f - 11f; +// area.height = GameCon.map.mapHeight * 1.0f - 8f; +// */ + +// Debug.Log(Camera.main.rect); + +// area.x = 0 + (Camera.main.rect.x / 2); +// area.y = 0f - (GameCon.map.mapHeight); +// area.width = (GameCon.map.mapHeight); +// area.height = (GameCon.map.mapHeight); + + +// Debug.Log(area); +// loaded = true; +// } + +// // Update is called once per frame +// void Update() +// { +// if (chase == null) +// { + + + +// return; + +// } +// if (loaded) +// { +// if (area.Contains(new Vector2(chase.position.x, chase.position.y))) +// { +// transform.position = chase.position + Vector3.back * 10; + +// } +// else if (chase.position.x > area.xMax && chase.position.y > area.yMax) +// { +// transform.position = new Vector3(area.xMax, area.yMax); +// } +// else if (chase.position.x > area.xMax && chase.position.y < area.yMin) +// { +// transform.position = new Vector3(area.xMax, area.yMin); +// } +// else if (chase.position.x < area.xMin && chase.position.y > area.yMax) +// { +// transform.position = new Vector3(area.xMin, area.yMax); +// } +// else if (chase.position.x < area.xMin && chase.position.y < area.yMin) +// { +// transform.position = new Vector3(area.xMin, area.yMin); + +// } +// else if (chase.position.x < area.xMin && area.yMax > chase.position.y && chase.position.y > area.yMin) +// { +// transform.position = new Vector3(area.xMin, chase.position.y); +// } +// else if (chase.position.x > area.xMax && area.yMax > chase.position.y && chase.position.y > area.yMin) +// { +// transform.position = new Vector3(area.xMax, chase.position.y); +// } +// else if (area.xMax > chase.position.x && chase.position.x > area.xMin && chase.position.y < area.yMin) +// { +// transform.position = new Vector3(chase.position.x, area.yMin); +// } +// else if (area.xMax > chase.position.x && chase.position.x > area.xMin && chase.position.y > area.yMax) +// { +// transform.position = new Vector3(chase.position.x, area.yMax); +// } +// transform.position = new Vector3(transform.position.x, transform.position.y, -10); + +// } +// } +//} + +namespace CivMarsEngine +{ + [AddComponentMenu("Camera/CameraChase")] + public class CameraChase : MonoBehaviour + { + + + public Transform chase; + public bool loaded = false; + + public float eventHorizont = 1.5f; + + public RectTransform rectTrans; + + Camera CameraScript; + GameController GameCon; + + void Start() + { + + + } + + // Use this for initialization + public void MapLoaded() + { + + CameraScript = this.GetComponent(); + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + + if (GameCon.map == null) + { + Debug.LogError("Can't find GameController"); + Debug.Break(); + } + + loaded = true; + } + + // Update is called once per frame + void Update() + { + if (chase == null) + { + + return; + + } + if (loaded) + { + float xCamPos = transform.position.x; + float yCamPos = -1 * transform.position.y; + + float xPos = chase.transform.position.x; + float yPos = -1 * chase.transform.position.y; + + float xCameraH = CameraScript.orthographicSize * (Screen.width / Screen.height) * (1 - CameraScript.rect.x); + float yCameraH = CameraScript.orthographicSize * (1 - CameraScript.rect.y); + + //transform.position = new Vector3(Mathf.Clamp(xPos, xCameraH, GameCon.map.mapHeight - xCameraH),-1 * Mathf.Clamp(-1*yPos, yCameraH, GameCon.map.mapHeight - yCameraH), transform.position.z); + transform.position = new Vector3( + Mathf.Clamp( + xCamPos + OutRangeClamp(xPos, xCamPos - xCameraH / eventHorizont, xCamPos + xCameraH / eventHorizont), + xCameraH, + GameCon.map.mapHeight - xCameraH + ), + + -1 * Mathf.Clamp( + yCamPos + OutRangeClamp(yPos, yCamPos - yCameraH / eventHorizont, yCamPos + yCameraH / eventHorizont), + yCameraH, + GameCon.map.mapHeight - yCameraH + ), + transform.position.z); + } + } + + float OutRangeClamp(float value, float Min, float Max) + { + if (value < Min) + { + //Debug.Log("if"); + return value - Min; + } + else if (value > Max) + { + //Debug.Log("else"); + + return value - Max; + } + return 0; + } + } + +} \ No newline at end of file diff --git a/Assets/Camera/CameraChase.cs.meta b/Assets/CivMarsEngine/Camera/CameraChase.cs.meta similarity index 100% rename from Assets/Camera/CameraChase.cs.meta rename to Assets/CivMarsEngine/Camera/CameraChase.cs.meta diff --git a/Assets/CivMarsEngine/ClassDiagram1.cd b/Assets/CivMarsEngine/ClassDiagram1.cd new file mode 100644 index 0000000..249cd49 --- /dev/null +++ b/Assets/CivMarsEngine/ClassDiagram1.cd @@ -0,0 +1,298 @@ + + + + + + AAAAAAAAAgAAIBIAAAAAAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\BuildingWGUI.cs + + + + + + + AEABAAAAAAAAAAAAAAAAAAAACAABAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Crafting\Recipe.cs + + + + + + RAwAEAQAASgAAAiCACIAIMIEQAABAAAABEAAAAAAAEA= + Assets\CivMarsEngine\GameController.cs + + + + + + AAAAAAAAAAAAIAAEAAgAEQAAAAAIgCAAAgAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasTank.cs + + + + + + AAAAQAAAAAAAAAAgAIAAAAAAgAAAAAgAAAAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasTankCluster.cs + + + + + + ABQAAAAAACAAIBIAACgIAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\GUI\Access Panel\AccesPanel.cs + + + + + + + AIYAAAAIECAQAAAAAgCAAAAAgAIAAAABBAQAgAQQgAA= + Assets\CivMarsEngine\GUI\Access Panel\GasDesplay\GasDesplay.cs + + + + + + AAYAAAAABDAEhAQAAAAAAAAAAAAEgAAAAAAgAARQAAA= + Assets\CivMarsEngine\GUI\Access Panel\GasDesplay\GasDesplayElement.cs + + + + + + AAQAAAAAkCAAEABAAgCAAAAAAAAAQEABAAACAAwAAQA= + Assets\CivMarsEngine\GUI\Access Panel\InventoryDesplay\InventoryDesplay.cs + + + + + + ABQAAABAIAACBQAAAAAAAQAAAAAEgAAAAAAAAAQBgEA= + Assets\CivMarsEngine\GUI\Access Panel\InventoryDesplay\InventoryDrawedElement.cs + + + + + + ABQAAAAAECAAgAAAAAAAAAAAAAAAAAABAAAAAAAAAAg= + Assets\CivMarsEngine\GUI\Access Panel\PlayerStatsDesplay.cs + + + + + + ABQAAAAAACAAIBIBjAACgAAAAAABAAAEAAAAISCAAIA= + Assets\CivMarsEngine\GUI\Buildables\BuildingLister.cs + + + + + + + ACSAAIAEAKAAINCwAAAABAICQAABAAABEAAEEAAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\CraftingDesplay.cs + + + + + + AAQAAAAAAAAAQAAAAAAQAAAAAAEAgAAAAAAAAABAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\CraftingProcess.cs + + + + + + AAAAAAAAAAAABABAAAAABAAAEAAAAAAAAAAEAAAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\QueueItem.cs + + + + + + AAQAAAAAAiAAAABAAAAAAAAAAAAgAAAAAAAAAQAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\RecipeButton.cs + + + + + + + AAQAAAAAACAAEAAAAgAAAAAAAAAAAAABAAACAAgAAQA= + Assets\CivMarsEngine\GUI\Inventory\PlayerInventory.cs + + + + + + ABQAAAAAIAACBAAAAAAAAAAAAAIAgAAAAAAAAAABgEA= + Assets\CivMarsEngine\GUI\Inventory\PlayerInventoryDrawedElement.cs + + + + + + ABCAAAAAACAAAAAAAIAAAAAAAAABAAAAAAAAAAAAEAA= + Assets\CivMarsEngine\GUI\MapListing\NewMap.cs + + + + + + ABQAAAAAAABAAAAAAIgAAAACAAAEAAAQAEAAAAAAAEA= + Assets\CivMarsEngine\GUI\MapListing\SavedMapLister.cs + + + + + + ABQACAAAACAAgAAAAAAAAAAAAAAAAAQAAAAAAAAAAAA= + Assets\CivMarsEngine\GUI\PlayerStats\PlayerStatsSidebarDesplay.cs + + + + + + ABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA= + Assets\CivMarsEngine\InputHandler.cs + + + + + + AAIAAAgAAAAAAABAAIAABAAAAAAIAAACAAAAAAAASAA= + Assets\CivMarsEngine\InventorySystem\Inventory.cs + + + + + + AF4IACAAECAAUCAEAAAAhAAAoACAAQACFCAAAAAASAg= + Assets\CivMarsEngine\Player\Player.cs + + + + + + + AIAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAAAAAAAAA= + Assets\CivMarsEngine\Player\SpaceSuit.cs + + + + + + + AAAAAAIACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAgAAAA= + Assets\CivMarsEngine\GUI\GUIHandler.cs + + + + + + ABQAgAAAAyAAIBIAAAAAAAAAAAAAAAAAAAAAAACIAAA= + Assets\CivMarsEngine\GUI\PauseTab.cs + + + + + + + AAAAgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Language.cs + + + + + + QAAQAJAAACAAQAAAAAAAAAEAAAAAAABADAAAAEACAAA= + Assets\CivMarsEngine\Map.cs + + + + + + AAQAAAAAACAgAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAA= + Assets\CivMarsEngine\Player\PlayerMovment.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\IGasTank.cs + + + + + + AAAAAAAgCAAAAAAAAAAAAAAQAhAAAAAAAACAAAAAAAA= + Assets\CivMarsEngine\Interfaces\IBuildable.cs + + + + + + AAAAAAAAAAAAAEAAAAQAAAACBAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Interfaces\ICrafter.cs + + + + + + AAAAAAAAAAAAIBIAAAAAAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\Interfaces\IHasGui.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAA= + Assets\CivMarsEngine\Interfaces\IRegystratabe.cs + + + + + + AAAAgIAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Interfaces\ISaveble.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA= + Assets\CivMarsEngine\Interfaces\IWorldGen.cs + + + + + + AAIAACAAAAAAECAAAAAAhAAAgAAAAAAABAAAAAAASAA= + Assets\CivMarsEngine\InventorySystem\IInventory.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAIAIAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasType.cs + + + + + + AAAAABBAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\GUI\Buildables\BuildingLister.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAAAAA= + Assets\CivMarsEngine\GameState.cs + + + + \ No newline at end of file diff --git a/Assets/CivMarsEngine/ClassDiagram1.cd.meta b/Assets/CivMarsEngine/ClassDiagram1.cd.meta new file mode 100644 index 0000000..0ead961 --- /dev/null +++ b/Assets/CivMarsEngine/ClassDiagram1.cd.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96d8120e226501546aefbfa984898131 +timeCreated: 1450798791 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Crafting.meta b/Assets/CivMarsEngine/Crafting.meta similarity index 67% rename from Assets/Crafting.meta rename to Assets/CivMarsEngine/Crafting.meta index feeb8a8..b7d09fb 100644 --- a/Assets/Crafting.meta +++ b/Assets/CivMarsEngine/Crafting.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0ddcb3f9c1ae3f447affe4edb1ec6fa5 +guid: 2c9775a5c6c257543be27629469543ff folderAsset: yes -timeCreated: 1447772400 +timeCreated: 1450798791 licenseType: Free DefaultImporter: userData: diff --git a/Assets/CivMarsEngine/Crafting/Recipe.cs b/Assets/CivMarsEngine/Crafting/Recipe.cs new file mode 100644 index 0000000..7c7b678 --- /dev/null +++ b/Assets/CivMarsEngine/Crafting/Recipe.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public class Recipe + { + public string buildingID; + public Item[] Materials; + public Item Crafted; + public float time; + + + public Recipe(string ID, Item[] m, Item c, float t) + { + buildingID = ID; + Materials = m; + Crafted = c; + time = t; + } + } +} \ No newline at end of file diff --git a/Assets/Crafting/Recipe.cs.meta b/Assets/CivMarsEngine/Crafting/Recipe.cs.meta similarity index 100% rename from Assets/Crafting/Recipe.cs.meta rename to Assets/CivMarsEngine/Crafting/Recipe.cs.meta diff --git a/Assets/GUI.meta b/Assets/CivMarsEngine/GUI.meta similarity index 67% rename from Assets/GUI.meta rename to Assets/CivMarsEngine/GUI.meta index e1e8aa7..ba4470e 100644 --- a/Assets/GUI.meta +++ b/Assets/CivMarsEngine/GUI.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 371f3a1cca3f0c3418f427f8cdf4391f +guid: 93d0924543f03a449b2d0451de3c2d6b folderAsset: yes -timeCreated: 1438703343 +timeCreated: 1450798791 licenseType: Free DefaultImporter: userData: diff --git a/Assets/GUI/Access Panel.meta b/Assets/CivMarsEngine/GUI/Access Panel.meta similarity index 100% rename from Assets/GUI/Access Panel.meta rename to Assets/CivMarsEngine/GUI/Access Panel.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/AccesPanel.cs b/Assets/CivMarsEngine/GUI/Access Panel/AccesPanel.cs new file mode 100644 index 0000000..5fc01f6 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/AccesPanel.cs @@ -0,0 +1,69 @@ +using UnityEngine; +using System.Collections; +using System; + +namespace CivMarsEngine +{ + public class AccesPanel : MonoBehaviour, IHasGui + { + public GameController GameCon; + + public Building OpenBuilding; + + public bool open; + + public GameObject[] AccesTabs; + + public GameObject Graphicks; + + public void Start() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + } + + + public void Update() + { + if (Input.GetButtonUp("Inventory")) + { + Debug.Log("Inventory opening"); + TogelGui(); + } + } + + #region IhasGui + public void TogelGui() + { + if (!open) + { + if (GameCon.AlloweGUI(this as IHasGui)) + { + Open(); + } + } + else + { + GameCon.CloseGUI(this as IHasGui); + Close(); + } + } + + public void Open() + { + open = true; + Graphicks.SetActive(true); + } + + public void Close() + { + open = false; + Graphicks.SetActive(false); + } + + public int ClosingLevel() + { + return 10; + } + #endregion + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/AccesPanel.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/AccesPanel.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/AccesPanel.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/AccesPanel.cs.meta diff --git a/Assets/GUI/Access Panel/GasDesplay.meta b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay.meta similarity index 100% rename from Assets/GUI/Access Panel/GasDesplay.meta rename to Assets/CivMarsEngine/GUI/Access Panel/GasDesplay.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplay.cs b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplay.cs new file mode 100644 index 0000000..ee622f2 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplay.cs @@ -0,0 +1,292 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + public class GasDesplay : MonoBehaviour + { + + + public GameObject GasCanvasPlayer; + public GameObject GasCanvasOther; + + public GameObject TankElement; + public GameObject TankElementBack; + + public GameObject[] drawedInvPlayer = new GameObject[10]; + public GameObject[] drawedInvOther = new GameObject[10]; + + GasTankCluster player; + GasTankCluster other; + + public GasDesplayElement OutPuting; + public GasDesplayElement InPuting; + + void Start() + { + player = GameObject.FindGameObjectWithTag("Player").GetComponent().GetTankCluster(); + } + + + void Update() + { + UpdateDesplay(); + if ((OutPuting != null && InPuting != null) && (OutPuting.tank.gasType == InPuting.tank.gasType || InPuting.tank.gasType == GasType.Null)) + { + OutPuting.tank.Transfer(InPuting.tank, 5f * Time.deltaTime); + } + } + + public void UpdateData(Building datas) + { + if (datas is IGasTank) + { + other = ((IGasTank)datas).GetTankCluster(); + } + } + + public void UpdateDesplay() + { + if (other == null) + { + UpdateDesplaySection(player, drawedInvPlayer, GasCanvasPlayer.gameObject, true); + + foreach (GameObject item in drawedInvOther) + { + Destroy(item); + } + } + else + { + UpdateDesplaySection(player, other, drawedInvPlayer, GasCanvasPlayer.gameObject, true); + UpdateDesplaySection(other, player, drawedInvOther, GasCanvasOther.gameObject, false); + } + } + + void UpdateDesplaySection(GasTankCluster TankThis, GasTankCluster TankOthe, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) + { + for (int i = 0; i < TankThis.size; i++) + { + GameObject actual = drawed[i]; + + //van itt item + + //Van kint valami + if (actual != null) + { + //Background element + if (actual.GetComponent() == null) + { + //Destroy back + Destroy(actual); + actual = null; + + //Create item + actual = null; + actual = Instantiate(TankElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(TankThis.GetTank(i), this); + } + } + else + { + //create item + actual = null; + actual = Instantiate(TankElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(TankThis.GetTank(i), this); + } + + + drawed[i] = actual; + } + } + + void UpdateDesplaySection(GasTankCluster TankThis, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) + { + for (int i = 0; i < TankThis.size; i++) + { + GameObject actual = drawed[i]; + + //van itt item + if (TankThis.GetTank(i).gasType != GasType.Null) + { + //Van kint valami + if (actual != null) + { + //Background element + if (actual.GetComponent() == null) + { + //Destroy back + Destroy(actual); + actual = null; + + //Create item + actual = null; + actual = Instantiate(TankElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(TankThis.GetTank(i), this); + + + } + //Item element + else if (actual.GetComponent() != null) + { + //update item + drawed[i].GetComponent().Set(TankThis.GetTank(i), this); + } + } + else + { + //create item + actual = null; + actual = Instantiate(TankElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + Debug.Log(TankThis.GetTank(i).ToString()); + + actual.GetComponent().Set(TankThis.GetTank(i), this); + } + } + //nics item + else + { + //Van kint valami + if (actual != null) + { + // background + if (actual.GetComponent() == null) + { + //OK + } + // Item element + else if (actual.GetComponent() != null) + { + //Destroy older + Destroy(actual); + actual = null; + + //Create Back + actual = null; + actual = Instantiate(TankElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + else + { + //Create Back + actual = null; + actual = Instantiate(TankElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + drawed[i] = actual; + } + } + + + public void SetOtherInv(IGasTank OtherInventory) + { + + if (OtherInventory != null) + { + other = OtherInventory.GetTankCluster(); + foreach (GameObject des in drawedInvOther) + { + Destroy(des); + } + drawedInvOther = new GameObject[other.size]; + } + else + { + foreach (GameObject des in drawedInvOther) + { + Destroy(des); + } + } + } + + public bool SetInput(GasDesplayElement t) + { + if (InPuting != null && InPuting != t) + { + InPuting.SetInput(false); + } + if (t != null) + { + if (OutPuting != null) + { + //if (OutPuting.tank.gasType == t.tank.gasType || t.tank.gasType == GasType.Null) + //{ + InPuting = t; + return true; + //} + //else + //{ + //return false; + //} + } + else + { + InPuting = t; + return true; + } + } + else + { + InPuting = null; + return true; + } + + } + + public bool SetOutput(GasDesplayElement t) + { + if (OutPuting != null && OutPuting != t) + { + OutPuting.SetOutput(false); + } + if (t != null) + { + if (InPuting != null) + { + //if (InPuting.tank.gasType == t.tank.gasType || t.tank.gasType == GasType.Null) + //{ + OutPuting = t; + return true; + //} + //else + //{ + //return false; + //} + } + else + { + OutPuting = t; + return true; + } + } + else + { + OutPuting = null; + return true; + } + } + + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/GasDesplay/GasDesplay.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplay.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/GasDesplay/GasDesplay.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplay.cs.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplayElement.cs b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplayElement.cs new file mode 100644 index 0000000..c7b212d --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplayElement.cs @@ -0,0 +1,156 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + public class GasDesplayElement : MonoBehaviour + { + + public Text gasName; + public Text amount; + public Slider amountSlider; + + public Toggle inButton; + public Toggle outButton; + + public bool inPressed; + public bool outPressed; + + public GasTank tank; + GasDesplay other; + + // Use this for initialization + void Start() + { + + } + + // Update is called once per frame + void Update() + { + if (tank != null) + { + if (tank.gasType != GasType.Null) + { + gasName.text = tank.gasType.ToString(); + } + else + { + gasName.text = "Nothing"; + } + amount.text = tank.amount + " / " + tank.maxAmount; + amountSlider.value = tank.amount / tank.maxAmount; + + inButton.gameObject.SetActive(true); + outButton.gameObject.SetActive(true); + } + else + { + //inButton.gameObject.SetActive(false); + //outButton.gameObject.SetActive(false); + } + + ChangedState(); + } + + public void Set(GasTank thisTnak, GasDesplay otherD) + { + other = otherD; + + if (thisTnak != null) + { + tank = thisTnak; + } + else + { + tank = null; + } + } + + public void Set(GasTank thisTnak) + { + if (thisTnak != null) + { + tank = thisTnak; + } + else + { + tank = null; + } + } + + public void ChangedState() + { + if (inButton.isOn != inPressed) + { + if (inButton.isOn) + { + if (!(other.SetInput(this))) + { + inButton.isOn = false; + } + + if (outPressed) + { + other.SetOutput(null); + } + } + else + { + other.SetInput(null); + } + inPressed = inButton.isOn; + outPressed = outButton.isOn; + } + if (outButton.isOn != outPressed) + { + if (outButton.isOn) + { + if (!(other.SetOutput(this))) + { + outButton.isOn = false; + } + + if (inPressed) + { + other.SetInput(null); + } + } + else + { + other.SetOutput(null); + } + inPressed = inButton.isOn; + outPressed = outButton.isOn; + } + /* + if(!h) + { + if (outPressed) + { + other.SetOutput(null); + } + if (inPressed) + { + other.SetInput(null); + } + inPressed = inButton.isOn; + outPressed = outButton.isOn; + } + */ + } + + public void SetInput(bool a) + { + inPressed = a; + inButton.isOn = a; + } + + public void SetOutput(bool a) + { + outPressed = a; + outButton.isOn = a; + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/GasDesplay/GasDesplayElement.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplayElement.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/GasDesplay/GasDesplayElement.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/GasDesplay/GasDesplayElement.cs.meta diff --git a/Assets/GUI/Access Panel/InventoryDesplay.meta b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay.meta similarity index 100% rename from Assets/GUI/Access Panel/InventoryDesplay.meta rename to Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs new file mode 100644 index 0000000..3b5175c --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs @@ -0,0 +1,284 @@ +using UnityEngine; +using System.Collections; +using System; + +namespace CivMarsEngine +{ + public class InventoryDesplay : MonoBehaviour + { + public GameObject InventoryCanvasPlayer; + public GameObject InventoryCanvasOther; + + public GameObject InventoryDubleElement; + public GameObject InventoryElementBack; + + GameObject[] drawedInvPlayer = new GameObject[10]; + GameObject[] drawedInvOther = new GameObject[10]; + + IInventory player; + IInventory other; + + void Start() + { + player = GameObject.FindGameObjectWithTag("Player").GetComponent(); + } + + void Update() + { + UpdateInventory(); + } + + public void UpdateInventory() + { + UpdateInventorySection(player, other, drawedInvPlayer, InventoryCanvasPlayer, true); + + UpdateInventorySection(other, player, drawedInvOther, InventoryCanvasOther, false); + } + + void UpdateInventorySection(IInventory invThis, IInventory invOthe, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) + { + for (int i = 0; i < invThis.GetInventorySize(); i++) + { + GameObject actual = drawed[i]; + + //van itt item + if (invThis.GetStackInSlot(i) != null) + { + //Van kint valami + if (actual != null) + { + //Background element + if (actual.GetComponent() == null) + { + //Destroy back + Destroy(actual); + actual = null; + + //Create item + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, invOthe, invThis, i); + } + //Item element + else + { + //update item + drawed[i].GetComponent().Set(invThis.GetStackInSlot(i).amount); + drawed[i].GetComponent().other = invOthe; + drawed[i].GetComponent().thisinv = invThis; + } + } + else + { + //create item + actual = null; + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, invOthe, invThis, i); + drawed[i] = actual; + } + } + //nics item + else + { + //Van kint valami + if (actual != null) + { + // background + if (actual.GetComponent() != null) + { + //Destroy older + Destroy(actual); + actual = null; + + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + else + { + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + drawed[i] = actual; + } + + int a = invThis.GetInventorySize() / 3; + if (invThis.GetInventorySize() % 3 > 0) + { + a++; + } + drawingCanvas.GetComponent().sizeDelta = new Vector2(0, (a * (50)) + 10); + } + + /* + void UpdateInventorySection(IInventory invThis, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) + { + for (int i = 0; i < invThis.GetInventorySize(); i++) + { + + + GameObject actual = drawed[i]; + + //van itt item + if (invThis.GetStackInSlot(i) != null) + { + //Van kint valami + if (actual != null) + { + //Background element + if (actual.GetComponent() == null) + { + //Destroy back + Destroy(actual); + actual = null; + + //Create item + actual = null; + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, null, invThis, i); + + + } + //Item element + else if (actual.GetComponent() != null) + { + //update item + drawed[i].GetComponent().Set(invThis.GetStackInSlot(i).amount); + drawed[i].GetComponent().other = null; + drawed[i].GetComponent().thisinv = invThis; + + } + } + else + { + //create item + actual = null; + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, null, invThis, i); + } + } + //nics item + else + { + //Van kint valami + if (actual != null) + { + // background + if (actual.GetComponent() == null) + { + //OK + } + // Item element + else if (actual.GetComponent() != null) + { + //Destroy older + Destroy(actual); + actual = null; + + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + else + { + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(drawingCanvas.transform); + actual.transform.SetSiblingIndex(i); + } + } + drawed[i] = actual; + } + } + */ + + public void Activate(IInventory OtherInventory) + { + if (OtherInventory != null) + { + other = OtherInventory; + + drawedInvOther = new GameObject[other.GetInventorySize()]; + + gameObject.SetActive(true); + } + } + + public void Deactive() + { + other = null; + + foreach (GameObject des in drawedInvOther) + { + Destroy(des); + } + + gameObject.SetActive(false); + + } + + /* + public void SetOtherInv(IInventory OtherInventory) + { + other = OtherInventory; + if (OtherInventory != null) + { + foreach (GameObject des in drawedInvOther) + { + Destroy(des); + } + + drawedInvOther = new GameObject[other.GetInventorySize()]; + } + else + { + foreach (GameObject des in drawedInvOther) + { + Destroy(des); + } + } + } + */ + + public void UpdateData() + { + throw new NotImplementedException(); + } + + public void UpdateData(Building datas) + { + if (datas is IInventory) + { + Activate(((IInventory)datas)); + } + else + { + Deactive(); + } + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs new file mode 100644 index 0000000..c038112 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs @@ -0,0 +1,99 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + [AddComponentMenu("Inventory/Inventory Element")] + public class InventoryDrawedElement : MonoBehaviour + { + GameController GameCon; + + public bool isPlayer; + public string drawname_name; + public int amount; + public int index; + + public IInventory other; + public IInventory thisinv; + + + public GameObject nameDisplay; + public GameObject amountDisplay; + public Button button; + + + // Use this for initialization + void Awake() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + } + + // Update is called once per frame + void Update() + { + if (other == null) + { + button.gameObject.SetActive(false); + } + else + { + button.gameObject.SetActive(true); + } + } + + + #region Set + public void Set(int setAmount) + { + this.amount = setAmount; + amountDisplay.GetComponent().text = null; + amountDisplay.GetComponent().text = setAmount.ToString(); + + //Debug.Log("updated drawed inv element: amount: " + amount + " type: " + this.name + " obj: " + this.GetType().ToString()); + } + + public void Set(string setName) + { + this.drawname_name = setName; + //Debug.Log(setName); + + nameDisplay.GetComponent().text = setName.ToString(); + } + + public void Set(string setName, int setAmount) + { + Set(setName); + Set(setAmount); + } + + public void Set(Item item, bool isp, IInventory o, IInventory t, int i) + { + isPlayer = isp; + other = o; + thisinv = t; + index = i; + + + Set(item.amount); + //Set(Language.Get(item, GameCon.language)); + Set(item.name); + } + #endregion + + + public void Transfer() + { + Debug.Log("Transfer"); + if (Input.GetButton("Specific")) + { + thisinv.TransferItemAmount(other, index, 1); + return; + } + + + thisinv.TransferItem(other, index); + + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs.meta diff --git a/Assets/CivMarsEngine/GUI/Access Panel/PlayerStatsDesplay.cs b/Assets/CivMarsEngine/GUI/Access Panel/PlayerStatsDesplay.cs new file mode 100644 index 0000000..d7df525 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Access Panel/PlayerStatsDesplay.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + class PlayerStatsTabDesplay : MonoBehaviour + { + GameController GameCon; + Player player; + + public Text health; + public Text hearthRate; + + void Start() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + player = GameCon.playerclass; + } + + void Update() + { + health.text = player.health.ToString(); + hearthRate.text = "60 rp"; + } + + public void UpdateData(Building datas) + { + //throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/PlayerStatsDesplay.cs.meta b/Assets/CivMarsEngine/GUI/Access Panel/PlayerStatsDesplay.cs.meta similarity index 100% rename from Assets/GUI/Access Panel/PlayerStatsDesplay.cs.meta rename to Assets/CivMarsEngine/GUI/Access Panel/PlayerStatsDesplay.cs.meta diff --git a/Assets/GUI/Buildables.meta b/Assets/CivMarsEngine/GUI/Buildables.meta similarity index 100% rename from Assets/GUI/Buildables.meta rename to Assets/CivMarsEngine/GUI/Buildables.meta diff --git a/Assets/CivMarsEngine/GUI/Buildables/BuildingLister.cs b/Assets/CivMarsEngine/GUI/Buildables/BuildingLister.cs new file mode 100644 index 0000000..aab8e44 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Buildables/BuildingLister.cs @@ -0,0 +1,174 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + public class BuildingLister : MonoBehaviour, IHasGui + { + public GameObject buildableDrawElement; + public GameObject buildingDesplayCanvas; + + public GameObject planedBuildingPrefab; + + bool guion; + + GameController GameCon; + + TogleGroupAdvanced toglegroup; + + BuildingListerStates state; + + public GameObject inBuilding; + public GameObject inSelecting; + + int SelectedBuilding; + + List buildingID; + + void Start() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + toglegroup = transform.FindChild("InSelecting").FindChild("Panel").GetComponent(); + state = BuildingListerStates.Idle; + + buildingID = new List(); + + foreach (KeyValuePair item in GameRegystry.buildings) + { + if (item.Value is IBuildable) + { + buildingID.Add(item.Key); + } + } + + for (int i = 0; i < buildingID.Count; i++) + { + GameObject actual = Instantiate(buildableDrawElement); + actual.transform.SetParent(buildingDesplayCanvas.transform); + actual.transform.SetSiblingIndex(i); + actual.transform.FindChild("Icon").GetComponent().sprite = ((IBuildable)GameRegystry.buildings[buildingID[i]]).GetImage(); + actual.GetComponent().group = toglegroup; + } + + } + + // Update is called once per frame + void Update() + { + + if (state == BuildingListerStates.Idle) + { + inBuilding.SetActive(false); + inSelecting.SetActive(false); + if (Input.GetButtonUp("BuildingList")) + { + Debug.Log("Buildning opening"); + + TogelGui(); + } + } + else if (state == BuildingListerStates.Building) + { + inBuilding.SetActive(true); + inSelecting.SetActive(false); + } + else if (state == BuildingListerStates.Selecting) + { + inBuilding.SetActive(false); + inSelecting.SetActive(true); + if (Input.GetButtonUp("BuildingList")) + { + Debug.Log("Buildning opening"); + + TogelGui(); + } + } + + if (Input.GetMouseButtonDown(0) && SelectedBuilding != -1 && state == BuildingListerStates.Building) + { + Vector3 ray = Camera.main.ScreenToWorldPoint(Input.mousePosition); + + TileVector pos = new TileVector(Mathf.Round(ray.x - 0.5f), -1 * Mathf.Round(ray.y + 0.5f + )); + + if (GameCon.map.Buildings.GetTileOn((int)pos.x, (int)pos.y) == null) + { + PlanedBuilding p = Instantiate(planedBuildingPrefab).GetComponent(); + GameCon.map.Buildings.SetTile(pos.x, pos.y, p.transform); + + p.SetBuilding(((IBuildable)GameRegystry.buildings[buildingID[SelectedBuilding]])); + + } + GameCon.CloseGUI(this); + Close(); + } + } + + public void BuildSelected() + { + SelectedBuilding = toglegroup.ActiveToggle().transform.GetSiblingIndex(); + if (SelectedBuilding == -1) + { + return; + } + + state = BuildingListerStates.Building; + } + + public void CancelBuilding() + { + SelectedBuilding = -1; + state = BuildingListerStates.Selecting; + } + + #region IhasGui + public void TogelGui() + { + if (!guion) + { + if (GameCon.AlloweGUI(this as IHasGui)) + { + Open(); + } + } + else + { + GameCon.CloseGUI(this as IHasGui); + Close(); + } + } + + public void Open() + { + guion = true; + state = BuildingListerStates.Selecting; + } + + public void Close() + { + guion = false; + state = BuildingListerStates.Idle; + } + + public int ClosingLevel() + { + if (state != BuildingListerStates.Building) + { + return 10; + } + else + { + return int.MaxValue; + } + } + #endregion + } + + public enum BuildingListerStates + { + Building, + Selecting, + Idle + } +} diff --git a/Assets/GUI/Buildables/BuildingLister.cs.meta b/Assets/CivMarsEngine/GUI/Buildables/BuildingLister.cs.meta similarity index 100% rename from Assets/GUI/Buildables/BuildingLister.cs.meta rename to Assets/CivMarsEngine/GUI/Buildables/BuildingLister.cs.meta diff --git a/Assets/GUI/Crafting Desplay.meta b/Assets/CivMarsEngine/GUI/Crafting Desplay.meta similarity index 100% rename from Assets/GUI/Crafting Desplay.meta rename to Assets/CivMarsEngine/GUI/Crafting Desplay.meta diff --git a/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingDesplay.cs b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingDesplay.cs new file mode 100644 index 0000000..df7b35d --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingDesplay.cs @@ -0,0 +1,189 @@ +using UnityEngine; +using System.Collections.Generic; +using UnityEngine.UI; + + +namespace CivMarsEngine +{ + public class CraftingDesplay : MonoBehaviour + { + public List recipes; + public string buildingID; + + public GameObject RecipeListCanvas; + public GameObject RecipeMaterialsCanvas; + public GameObject QueueCanvas; + public GameObject QueueMaterialsCanvas; + public Image RecipeIcon; + public Text RecipeText; + + public List recipesDesplayed; + public List recepiesDetealdMaterials; + public List queueDesplayed; + public List queueMaterialDesplayed; + + public GameObject recipeDesplayPref; + public GameObject queueItemPref; + public GameObject queueMaterialItemPref; + + public ICrafter crafter; + + // Use this for initialization + void Start() + { + + } + + // Update is called once per frame + void Update() + { + UpdateQueue(); + } + + void UpdateQueue() + { + CraftingProcess[] k = crafter.GetQueue(); + + #region Queue + for (int i = 0; i < k.Length; i++) + { + if (i == queueDesplayed.Count) + { + queueDesplayed.Add(Instantiate(queueItemPref)); + queueDesplayed[i].GetComponent().Set(k[i].recipe.time, k[i].status, k[i].recipe.Crafted.texture, this); + queueDesplayed[i].transform.SetParent(QueueCanvas.transform); + } + else + { + queueDesplayed[i].GetComponent().Set(k[i].recipe.time, k[i].status, k[i].recipe.Crafted.texture, this); + } + } + + for (int i = k.Length; i < queueDesplayed.Count; i++) + { + Destroy(queueDesplayed[i]); + queueDesplayed.RemoveAt(i); + } + #endregion + + #region Queue Material; + if (k.Length > 0) + { + + for (int i = 0; i < k[0].recipe.Materials.Length; i++) + { + if (i == queueMaterialDesplayed.Count) + { + queueMaterialDesplayed.Add(Instantiate(queueMaterialItemPref)); + queueMaterialDesplayed[i].transform.FindChild("Image").GetComponent().sprite = k[0].recipe.Materials[i].texture; + queueMaterialDesplayed[i].transform.FindChild("Text").GetComponent().text = k[0].recipe.Materials[i].amount - k[0].materials[i] + "/" + k[0].recipe.Materials[i].amount; + queueMaterialDesplayed[i].transform.SetParent(QueueMaterialsCanvas.transform); + } + else + { + queueMaterialDesplayed[i].transform.FindChild("Image").GetComponent().sprite = k[0].recipe.Materials[i].texture; + queueMaterialDesplayed[i].transform.FindChild("Text").GetComponent().text = k[0].recipe.Materials[i].amount - k[0].materials[i] + "/" + k[0].recipe.Materials[i].amount; + } + } + + for (int i = k.Length; i < queueMaterialDesplayed.Count; i++) + { + Destroy(queueMaterialDesplayed[i]); + queueMaterialDesplayed.RemoveAt(i); + } + } + #endregion + + + } + + public void ChangeDetealsTab(int i) + { + if (i == -1) + { + RecipeIcon.sprite = null; + RecipeText.text = ""; + for (int j = 0; j < recepiesDetealdMaterials.Count; j++) + { + recepiesDetealdMaterials[j].SetActive(false); + } + } + else + { + RecipeIcon.sprite = recipes[i].Crafted.texture; + RecipeText.text = recipes[i].Crafted.ToString(); + + for (int j = 0; j < recepiesDetealdMaterials.Count; j++) + { + if (j == recipes[j].Materials.Length) + { + recepiesDetealdMaterials[j].SetActive(false); + } + else + { + recepiesDetealdMaterials[j].SetActive(true); + recepiesDetealdMaterials[j].transform.FindChild("Image").GetComponent().sprite = recipes[i].Materials[j].texture; + recepiesDetealdMaterials[j].transform.FindChild("Text").GetComponent().text = recipes[i].Materials[j].amount.ToString(); + Debug.Log(recipes[i].Materials[j].amount.ToString()); + + } + } + + for (int j = recepiesDetealdMaterials.Count; j < recipes[i].Materials.Length; j++) + { + recepiesDetealdMaterials.Add(Instantiate(queueMaterialItemPref)); + recepiesDetealdMaterials[j].transform.SetParent(RecipeMaterialsCanvas.transform); + recepiesDetealdMaterials[j].transform.FindChild("Image").GetComponent().sprite = recipes[i].Materials[j].texture; + recepiesDetealdMaterials[j].transform.FindChild("Text").GetComponent().text = recipes[i].Materials[j].amount.ToString(); + + } + } + + } + + public void AddToQueue(int i) + { + crafter.AddToQueue(i); + } + + public void RemoveFromQueue(int i) + { + crafter.RemoveFromQueue(i); + } + + public void SetBuilding(ICrafter b) + { + for (int i = 0; i < queueDesplayed.Count; i++) + { + Destroy(queueDesplayed[i]); + queueDesplayed.RemoveAt(i); + } + + for (int i = 0; i < recipesDesplayed.Count; i++) + { + Destroy(recipesDesplayed[i]); + } + + recipesDesplayed = new List(); + + if (b != null) + { + recipesDesplayed = new List(); + buildingID = b.GetCraftingID(); + crafter = b; + + recipes = GameRegystry.recepies[buildingID]; + + foreach (Recipe item in GameRegystry.recepies[buildingID]) + { + GameObject current = Instantiate(recipeDesplayPref); + recipesDesplayed.Add(current); + current.transform.FindChild("Image").GetComponent().sprite = item.Crafted.texture; + current.transform.SetParent(RecipeListCanvas.transform); + current.GetComponent().parent = this; + } + } + } + + } +} \ No newline at end of file diff --git a/Assets/GUI/Crafting Desplay/CraftingDesplay.cs.meta b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingDesplay.cs.meta similarity index 100% rename from Assets/GUI/Crafting Desplay/CraftingDesplay.cs.meta rename to Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingDesplay.cs.meta diff --git a/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingProcess.cs b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingProcess.cs new file mode 100644 index 0000000..355c287 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingProcess.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public class CraftingProcess + { + public Recipe recipe; + public float status; + //bool hasItems = false; + + int[] r_materials; + public int[] materials + { + get + { + return r_materials; + } + + set + { + r_materials = value; + bool k = true; + for (int i = 0; i < recipe.Materials.Length; i++) + { + if (r_materials[i] != 0) + { + k = false; + } + } + } + } + + public int amount; + + public CraftingProcess(Recipe r, int am) + { + recipe = r; + status = r.time; + materials = new int[r.Materials.Length]; + for (int i = 0; i < r.Materials.Length; i++) + { + materials[i] = r.Materials[i].amount; + } + amount = am; + } + + public bool HasItems() + { + for (int i = 0; i < recipe.Materials.Length; i++) + { + if (r_materials[i] != 0) + { + return false; + } + } + + return true; + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Crafting Desplay/CraftingProcess.cs.meta b/Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingProcess.cs.meta similarity index 100% rename from Assets/GUI/Crafting Desplay/CraftingProcess.cs.meta rename to Assets/CivMarsEngine/GUI/Crafting Desplay/CraftingProcess.cs.meta diff --git a/Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs b/Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs new file mode 100644 index 0000000..16de97d --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System.Collections; + +namespace CivMarsEngine +{ + public class QueueItem : MonoBehaviour + { + + public CraftingDesplay parent; + + public Slider slider; + public Image image; + + /* + // Use this for initialization + void Start() + { + } + + // Update is called once per frame + void Update() + { + + } + */ + + public void Set(float max, float t, Sprite texture, CraftingDesplay p) + { + slider.maxValue = max; + slider.value = t; + image.sprite = texture; + parent = p; + } + + public void Remove() + { + parent.RemoveFromQueue(transform.GetSiblingIndex()); + } + } +} \ No newline at end of file diff --git a/Assets/GUI/Crafting Desplay/QueueItem.cs.meta b/Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs.meta similarity index 95% rename from Assets/GUI/Crafting Desplay/QueueItem.cs.meta rename to Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs.meta index 8961923..f938bc2 100644 --- a/Assets/GUI/Crafting Desplay/QueueItem.cs.meta +++ b/Assets/CivMarsEngine/GUI/Crafting Desplay/QueueItem.cs.meta @@ -1,12 +1,12 @@ -fileFormatVersion: 2 -guid: 232e9f834b9e33c469d296deb0600b54 -timeCreated: 1448726693 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 232e9f834b9e33c469d296deb0600b54 +timeCreated: 1448726693 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/GUI/Crafting Desplay/RecipeButton.cs b/Assets/CivMarsEngine/GUI/Crafting Desplay/RecipeButton.cs new file mode 100644 index 0000000..1195d53 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Crafting Desplay/RecipeButton.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using UnityEngine.EventSystems; +using System.Collections; +using System; + + +namespace CivMarsEngine +{ + public class RecipeButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler + { + + public CraftingDesplay parent; + + // Use this for initialization + void Start() + { + } + + // Update is called once per frame + void Update() + { + + } + + public void OnPointerEnter(PointerEventData eventData) + { + parent.ChangeDetealsTab(transform.GetSiblingIndex()); + } + + public void OnPointerExit(PointerEventData eventData) + { + parent.ChangeDetealsTab(-1); + } + + public void OnPointerClick(PointerEventData eventData) + { + parent.AddToQueue(transform.GetSiblingIndex()); + } + } + +} \ No newline at end of file diff --git a/Assets/GUI/Crafting Desplay/RecipeButton.cs.meta b/Assets/CivMarsEngine/GUI/Crafting Desplay/RecipeButton.cs.meta similarity index 100% rename from Assets/GUI/Crafting Desplay/RecipeButton.cs.meta rename to Assets/CivMarsEngine/GUI/Crafting Desplay/RecipeButton.cs.meta diff --git a/Assets/GUI/GUIHandler.cs b/Assets/CivMarsEngine/GUI/GUIHandler.cs similarity index 82% rename from Assets/GUI/GUIHandler.cs rename to Assets/CivMarsEngine/GUI/GUIHandler.cs index 851d294..2cdf010 100644 --- a/Assets/GUI/GUIHandler.cs +++ b/Assets/CivMarsEngine/GUI/GUIHandler.cs @@ -1,29 +1,30 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.UI; -using System; - -public class GUIHandler : MonoBehaviour -{ - public AccesPanel AccesPanel; - - public ActionButton[] actions = new ActionButton[10]; - - - public InventoryDesplay defaultInventory; - public GasDesplay defaultGas; - public CraftingDesplay defaultCrafting; - - // Use this for initialization - void Start() - { - - - } - - // Update is called once per frame - void Update() - { - - } -} +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using System; +using CivMarsEngine; + +public class GUIHandler : MonoBehaviour +{ + public AccesPanel AccesPanel; + + public InventoryDesplay defaultInventory; + public GasDesplay defaultGas; + public CraftingDesplay defaultCrafting; + + /* + // Use this for initialization + void Start() + { + + + } + + // Update is called once per frame + void Update() + { + + } + */ + +} diff --git a/Assets/GUI/GUIHandler.cs.meta b/Assets/CivMarsEngine/GUI/GUIHandler.cs.meta similarity index 100% rename from Assets/GUI/GUIHandler.cs.meta rename to Assets/CivMarsEngine/GUI/GUIHandler.cs.meta diff --git a/Assets/GUI/Inventory.meta b/Assets/CivMarsEngine/GUI/Inventory.meta similarity index 100% rename from Assets/GUI/Inventory.meta rename to Assets/CivMarsEngine/GUI/Inventory.meta diff --git a/Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs new file mode 100644 index 0000000..f177605 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs @@ -0,0 +1,121 @@ +using UnityEngine; +using System.Collections; +using System; + +namespace CivMarsEngine +{ + public class PlayerInventory : MonoBehaviour + { + public GameObject InventoryCanvasPlayer; + //public GameObject InventoryCanvasOther; + + public GameObject InventoryDubleElement; + public GameObject InventoryElementBack; + + GameObject[] drawedInvPlayer = new GameObject[10]; + //GameObject[] drawedInvOther = new GameObject[10]; + + IInventory player; + //IInventory other; + + void Start() + { + player = GameObject.FindGameObjectWithTag("Player").GetComponent(); + } + + void Update() + { + UpdateInventory(); + } + + public void UpdateInventory() + { + + for (int i = 0; i < player.GetInventorySize(); i++) + { + GameObject actual = drawedInvPlayer[i]; + + //van itt item + if (player.GetStackInSlot(i) != null) + { + //Van kint valami + if (actual != null) + { + //Background element + if (actual.GetComponent() == null) + { + //Destroy back + Destroy(actual); + actual = null; + + //Create item + actual = null; + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(InventoryCanvasPlayer.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(player.GetStackInSlot(i), i); + + + } + //Item element + else + { + //update item + drawedInvPlayer[i].GetComponent().Set(player.GetStackInSlot(i), i); + + } + } + else + { + //create item + actual = null; + actual = Instantiate(InventoryDubleElement); + actual.transform.SetParent(InventoryCanvasPlayer.transform); + actual.transform.SetSiblingIndex(i); + + + actual.GetComponent().Set(player.GetStackInSlot(i), i); + } + } + //nics item + else + { + //Van kint valami + if (actual != null) + { + // background + if (actual.GetComponent() == null) + { + //OK + } + // Item element + else + { + //Destroy older + Destroy(actual); + actual = null; + + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(InventoryCanvasPlayer.transform); + actual.transform.SetSiblingIndex(i); + } + } + else + { + //Create Back + actual = null; + actual = Instantiate(InventoryElementBack); + actual.transform.SetParent(InventoryCanvasPlayer.transform); + actual.transform.SetSiblingIndex(i); + } + } + drawedInvPlayer[i] = actual; + } + } + + } +} \ No newline at end of file diff --git a/Assets/GUI/Inventory/PlayerInventory.cs.meta b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs.meta similarity index 95% rename from Assets/GUI/Inventory/PlayerInventory.cs.meta rename to Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs.meta index 1748c93..cec5e59 100644 --- a/Assets/GUI/Inventory/PlayerInventory.cs.meta +++ b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventory.cs.meta @@ -1,12 +1,12 @@ -fileFormatVersion: 2 -guid: 90f1701421bfcdb4980981a334136186 -timeCreated: 1449316567 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 90f1701421bfcdb4980981a334136186 +timeCreated: 1449316567 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs new file mode 100644 index 0000000..ce9db48 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs @@ -0,0 +1,77 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + [AddComponentMenu("Inventory/Inventory Element")] + public class PlayerInventoryDrawedElement : MonoBehaviour + { + GameController GameCon; + + //public bool isPlayer; + public string drawname_name; + public int amount; + public int index; + + public GameObject nameDisplay; + public GameObject amountDisplay; + public GameObject iconDesplay; + + + // Use this for initialization + void Awake() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + } + + // Update is called once per frame + void Update() + { + } + + + #region Set + /* + public void Set(int setAmount) + { + this.amount = setAmount; + amountDisplay.GetComponent().text = null; + amountDisplay.GetComponent().text = setAmount.ToString(); + + //Debug.Log("updated drawed inv element: amount: " + amount + " type: " + this.name + " obj: " + this.GetType().ToString()); + } + + public void Set(string setName) + { + this.drawname_name = setName; + //Debug.Log(setName); + + nameDisplay.GetComponent().text = setName.ToString(); + } + + public void Set(string setName, int setAmount) + { + Set(setName); + Set(setAmount); + } + */ + + public void Set(Item item, int i) + { + //isPlayer = isp; + //other = o; + //thisinv = t; + index = i; + + amount = item.amount; + amountDisplay.GetComponent().text = amount.ToString(); + + drawname_name = item.name; + nameDisplay.GetComponent().text = drawname_name; + + iconDesplay.GetComponent().sprite = item.texture; + } + #endregion + } +} \ No newline at end of file diff --git a/Assets/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta similarity index 95% rename from Assets/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta rename to Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta index ded6546..84861a8 100644 --- a/Assets/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta +++ b/Assets/CivMarsEngine/GUI/Inventory/PlayerInventoryDrawedElement.cs.meta @@ -1,12 +1,12 @@ -fileFormatVersion: 2 -guid: e99515fb53cbfb24a8b6eb1f9f704e91 -timeCreated: 1449317235 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: e99515fb53cbfb24a8b6eb1f9f704e91 +timeCreated: 1449317235 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/MapListing.meta b/Assets/CivMarsEngine/GUI/MapListing.meta similarity index 100% rename from Assets/GUI/MapListing.meta rename to Assets/CivMarsEngine/GUI/MapListing.meta diff --git a/Assets/CivMarsEngine/GUI/MapListing/NewMap.cs b/Assets/CivMarsEngine/GUI/MapListing/NewMap.cs new file mode 100644 index 0000000..0a8e225 --- /dev/null +++ b/Assets/CivMarsEngine/GUI/MapListing/NewMap.cs @@ -0,0 +1,34 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using UnityEngine.SceneManagement; +using CivMarsEngine; + +namespace CivMarsEngine +{ + public class NewMap : MonoBehaviour + { + public GameController GameCon; + + public InputField nameField; + public InputField seedField; + + AsyncOperation loadingmap; + + // Use this for initialization + void Start() + { + GameCon = GameObject.Find("_GameController").GetComponent(); + loadingmap = new AsyncOperation(); + } + + public void CreateMap() + { + SavedMapData map = new SavedMapData(int.Parse(seedField.text), nameField.text); + + GameCon.mapData = map; + + StartCoroutine(GameCon.LoadLevel("Main")); + } + } +} \ No newline at end of file diff --git a/Assets/GUI/MapListing/NewMap.cs.meta b/Assets/CivMarsEngine/GUI/MapListing/NewMap.cs.meta similarity index 100% rename from Assets/GUI/MapListing/NewMap.cs.meta rename to Assets/CivMarsEngine/GUI/MapListing/NewMap.cs.meta diff --git a/Assets/CivMarsEngine/GUI/MapListing/SavedMapLister.cs b/Assets/CivMarsEngine/GUI/MapListing/SavedMapLister.cs new file mode 100644 index 0000000..29d673e --- /dev/null +++ b/Assets/CivMarsEngine/GUI/MapListing/SavedMapLister.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.UI; +using CivMarsEngine; + + +namespace CivMarsEngine +{ + public class SavedMapLister : MonoBehaviour + { + + GameController GameCon; + + public List desplayed = new List(); + + public GameObject desplayPref; + public GameObject canvas; + + public TogleGroupAdvanced togGrup; + + public Text mapName; + + /// Use this for initialization + void Awake() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + } + + // Update is called once per frame + void Update() + { + Toggle num = togGrup.ActiveToggle(); + if (num == null) + { + mapName.text = ""; + } + else + { + + SavedMapData.DisplayDeteals selected = GameCon.savedMaps[num.transform.GetSiblingIndex()]; + mapName.text = selected.name; + } + } + + public void LoadSelected() + { + Toggle num = togGrup.ActiveToggle(); + if (num == null) + { + } + else + { + GameCon.mapData = GameCon.GetSavedMap(GameCon.savedMaps[num.transform.GetSiblingIndex()].path); + StartCoroutine(GameCon.LoadLevel("Main")); + } + } + + public void Refresh() + { + GameCon.LoadMaps(); + + foreach (GameObject item in desplayed) + { + Destroy(item); + } + + foreach (SavedMapData.DisplayDeteals item in GameCon.savedMaps) + { + GameObject a = Instantiate(desplayPref); + a.transform.SetParent(canvas.transform); + a.transform.FindChild("Name").GetComponent().text = item.name; + a.GetComponent().group = togGrup; + desplayed.Add(a); + } + } + + } +} \ No newline at end of file diff --git a/Assets/GUI/MapListing/SavedMapLister.cs.meta b/Assets/CivMarsEngine/GUI/MapListing/SavedMapLister.cs.meta similarity index 100% rename from Assets/GUI/MapListing/SavedMapLister.cs.meta rename to Assets/CivMarsEngine/GUI/MapListing/SavedMapLister.cs.meta diff --git a/Assets/GUI/PauseTab.cs b/Assets/CivMarsEngine/GUI/PauseTab.cs similarity index 94% rename from Assets/GUI/PauseTab.cs rename to Assets/CivMarsEngine/GUI/PauseTab.cs index 195a193..4ad4933 100644 --- a/Assets/GUI/PauseTab.cs +++ b/Assets/CivMarsEngine/GUI/PauseTab.cs @@ -1,8 +1,9 @@ using UnityEngine; using System.Collections; -using System; - -public class PauseTab : MonoBehaviour, IHasGui +using System; +using CivMarsEngine; + +public class PauseTab : MonoBehaviour, IHasGui { bool on; @@ -16,60 +17,60 @@ void Start () { // Update is called once per frame void Update () { - if (Input.GetButtonUp("Pause")) - { - TogelGui(); + if (Input.GetButtonUp("Pause")) + { + TogelGui(); + } + } + + public void TogelGui() + { + if (!on) + { + if (GameCon.HasOpendGui()) + { + GameCon.CloseGUI(null); + } + else + { + if (GameCon.AlloweGUI(this)) + { + Open(); + } + } } - } - - public void TogelGui() - { - if (!on) - { - if (GameCon.HasOpendGui()) - { - GameCon.CloseGUI(null); - } - else - { - if (GameCon.AlloweGUI(this)) - { - Open(); - } - } - } - else - { - GameCon.CloseGUI(this); - Close(); - } - } - - public void Open() - { - Content.SetActive(true); - on = true; - } - - public void Close() - { - Content.SetActive(false); - on = false; - } - - public int ClosingLevel() - { - return int.MaxValue; - } - - public void SaveMap() - { - GameCon.SaveMap(); - } - - public void SaveNQuit() - { - GameCon.SaveMap(); - GameCon.QuitGame(); - } + else + { + GameCon.CloseGUI(this); + Close(); + } + } + + public void Open() + { + Content.SetActive(true); + on = true; + } + + public void Close() + { + Content.SetActive(false); + on = false; + } + + public int ClosingLevel() + { + return int.MaxValue; + } + + public void SaveMap() + { + GameCon.SaveMap(); + } + + public void SaveNQuit() + { + GameCon.SaveMap(); + GameCon.QuitGame(); + } } diff --git a/Assets/GUI/PauseTab.cs.meta b/Assets/CivMarsEngine/GUI/PauseTab.cs.meta similarity index 100% rename from Assets/GUI/PauseTab.cs.meta rename to Assets/CivMarsEngine/GUI/PauseTab.cs.meta diff --git a/Assets/GUI/PlayerStats.meta b/Assets/CivMarsEngine/GUI/PlayerStats.meta similarity index 100% rename from Assets/GUI/PlayerStats.meta rename to Assets/CivMarsEngine/GUI/PlayerStats.meta diff --git a/Assets/CivMarsEngine/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs b/Assets/CivMarsEngine/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs new file mode 100644 index 0000000..ed4ed6b --- /dev/null +++ b/Assets/CivMarsEngine/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using CivMarsEngine; + +namespace CivMarsEngine +{ + public class PlayerStatsSidebarDesplay : MonoBehaviour + { + public Slider OxigenSlider; + public Slider CarbonDioxideSlider; + public Image Health; + + GameController GameCon; + + //GameObject[] hRPeaces = new GameObject[10]; + + // Use this for initialization + void Start() + { + GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); + } + + // Update is called once per frame + void Update() + { + GasTankCluster t = GameCon.playerclass.GetTankCluster(); + + OxigenSlider.value = t.GetTank(GasType.Oxigen).amount / t.GetTank(GasType.Oxigen).maxAmount; + CarbonDioxideSlider.value = t.GetTank(GasType.CarbonDeOxide).amount / t.GetTank(GasType.CarbonDeOxide).maxAmount; + + Health.color = new Color(0, 0, 0, 1 - GameCon.playerclass.health); + + /* + foreach (GameObject item in hRPeaces) + { + //item.transform.position = new Vector3(item.transform.position.x); + } + */ + } + } +} \ No newline at end of file diff --git a/Assets/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs.meta b/Assets/CivMarsEngine/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs.meta similarity index 100% rename from Assets/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs.meta rename to Assets/CivMarsEngine/GUI/PlayerStats/PlayerStatsSidebarDesplay.cs.meta diff --git a/Assets/GUI/UITextures.meta b/Assets/CivMarsEngine/GUI/UITextures.meta similarity index 95% rename from Assets/GUI/UITextures.meta rename to Assets/CivMarsEngine/GUI/UITextures.meta index 5159e95..0c2aea8 100644 --- a/Assets/GUI/UITextures.meta +++ b/Assets/CivMarsEngine/GUI/UITextures.meta @@ -1,9 +1,9 @@ -fileFormatVersion: 2 -guid: 8c1a24996afdb234590f79fc13e9c81b -folderAsset: yes -timeCreated: 1448801260 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 8c1a24996afdb234590f79fc13e9c81b +folderAsset: yes +timeCreated: 1448801260 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Animation.meta b/Assets/CivMarsEngine/GUI/UITextures/Animation.meta similarity index 100% rename from Assets/GUI/UITextures/Animation.meta rename to Assets/CivMarsEngine/GUI/UITextures/Animation.meta diff --git a/Assets/GUI/UITextures/Fonts.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts.meta index 6526470..5580765 100644 --- a/Assets/GUI/UITextures/Fonts.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts.meta @@ -1,9 +1,9 @@ -fileFormatVersion: 2 -guid: 04866a43f01a3d74590f4bf4206502d0 -folderAsset: yes -timeCreated: 1449001566 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 04866a43f01a3d74590f4bf4206502d0 +folderAsset: yes +timeCreated: 1449001566 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Consolas.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Consolas.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas.meta index 9d96ec6..adce0b3 100644 --- a/Assets/GUI/UITextures/Fonts/Consolas.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas.meta @@ -1,9 +1,9 @@ -fileFormatVersion: 2 -guid: c87e1939091425348975b789273b5625 -folderAsset: yes -timeCreated: 1449001586 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: c87e1939091425348975b789273b5625 +folderAsset: yes +timeCreated: 1449001586 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF similarity index 100% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta index 2595666..d6386b8 100644 --- a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLA.TTF.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: eabdb8fe246655140bbb30fb1476f1de -timeCreated: 1448823422 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: eabdb8fe246655140bbb30fb1476f1de +timeCreated: 1448823422 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF similarity index 100% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta index 874595b..4e6373a 100644 --- a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAB.TTF.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: 9f1a9c7411c571e479dfe4eb81cd1368 -timeCreated: 1448823422 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 9f1a9c7411c571e479dfe4eb81cd1368 +timeCreated: 1448823422 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF similarity index 100% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta index d656b9f..a7f3fc0 100644 --- a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAI.TTF.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: 271a35a004b7f96459bd2dc62e3076ae -timeCreated: 1448823422 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 271a35a004b7f96459bd2dc62e3076ae +timeCreated: 1448823422 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF similarity index 100% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF diff --git a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta index 5a636ca..c428bae 100644 --- a/Assets/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Consolas/CONSOLAZ.TTF.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: 0bb9dbbefb31df54094b8044d3a152c8 -timeCreated: 1448823422 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 0bb9dbbefb31df54094b8044d3a152c8 +timeCreated: 1448823422 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Google.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Google.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google.meta index bdbaad6..e95791c 100644 --- a/Assets/GUI/UITextures/Fonts/Google.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google.meta @@ -1,9 +1,9 @@ -fileFormatVersion: 2 -guid: 22138de56c4fe5d4faa7b031fe00f0da -folderAsset: yes -timeCreated: 1449001600 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 22138de56c4fe5d4faa7b031fe00f0da +folderAsset: yes +timeCreated: 1449001600 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf diff --git a/Assets/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta index 3dfc8c9..8ff7661 100644 --- a/Assets/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Aldrich-Regular.ttf.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: 393b1e2283a68b94f84e2bbaabc64318 -timeCreated: 1449001663 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 393b1e2283a68b94f84e2bbaabc64318 +timeCreated: 1449001663 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf diff --git a/Assets/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta index e79f43f..2d2ebed 100644 --- a/Assets/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Electrolize-Regular.ttf.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: e5759157bd675904a9ab0103173475c5 -timeCreated: 1449001642 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: e5759157bd675904a9ab0103173475c5 +timeCreated: 1449001642 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf diff --git a/Assets/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta index 32bb45b..87bbabd 100644 --- a/Assets/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Orbitron-Regular.ttf.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: 30a2dd171e2e59440a734a603e640bb6 -timeCreated: 1449001540 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 30a2dd171e2e59440a734a603e640bb6 +timeCreated: 1449001540 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf diff --git a/Assets/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta similarity index 95% rename from Assets/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta index 391b048..13b8321 100644 --- a/Assets/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Google/Quantico-Regular.ttf.meta @@ -1,19 +1,19 @@ -fileFormatVersion: 2 -guid: f114ec948a28aac46a8a0baf8ff44612 -timeCreated: 1449001501 -licenseType: Free -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: f114ec948a28aac46a8a0baf8ff44612 +timeCreated: 1449001501 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Fonts/Michroma.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Michroma.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Michroma.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Michroma.ttf diff --git a/Assets/GUI/UITextures/Fonts/Michroma.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Michroma.ttf.meta similarity index 100% rename from Assets/GUI/UITextures/Fonts/Michroma.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Michroma.ttf.meta diff --git a/Assets/GUI/UITextures/Fonts/Other.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other.meta similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other.meta diff --git a/Assets/GUI/UITextures/Fonts/Other/Minecraft.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Minecraft.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/Minecraft.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Minecraft.ttf diff --git a/Assets/GUI/UITextures/Fonts/Other/Minecraft.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Minecraft.ttf.meta similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/Minecraft.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Minecraft.ttf.meta diff --git a/Assets/GUI/UITextures/Fonts/Other/Squares Bold Free.otf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Squares Bold Free.otf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/Squares Bold Free.otf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Squares Bold Free.otf diff --git a/Assets/GUI/UITextures/Fonts/Other/Squares Bold Free.otf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Squares Bold Free.otf.meta similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/Squares Bold Free.otf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/Squares Bold Free.otf.meta diff --git a/Assets/GUI/UITextures/Fonts/Other/monofonto.ttf b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/monofonto.ttf similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/monofonto.ttf rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/monofonto.ttf diff --git a/Assets/GUI/UITextures/Fonts/Other/monofonto.ttf.meta b/Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/monofonto.ttf.meta similarity index 100% rename from Assets/GUI/UITextures/Fonts/Other/monofonto.ttf.meta rename to Assets/CivMarsEngine/GUI/UITextures/Fonts/Other/monofonto.ttf.meta diff --git a/Assets/GUI/UITextures/GUI.Header.png b/Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png similarity index 100% rename from Assets/GUI/UITextures/GUI.Header.png rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png diff --git a/Assets/GUI/UITextures/GUI.Header.png.meta b/Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png.meta similarity index 95% rename from Assets/GUI/UITextures/GUI.Header.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png.meta index c59e2a8..54f8ad6 100644 --- a/Assets/GUI/UITextures/GUI.Header.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 0fac5183a68542f4585ed060192a365f -timeCreated: 1449315158 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 3, y: 3, z: 3, w: 3} - spritePixelsToUnits: 2 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 0fac5183a68542f4585ed060192a365f +timeCreated: 1449315158 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 2 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/GUI.Inverted.png b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png similarity index 100% rename from Assets/GUI/UITextures/GUI.Inverted.png rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png diff --git a/Assets/GUI/UITextures/GUI.Inverted.png.meta b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png.meta similarity index 95% rename from Assets/GUI/UITextures/GUI.Inverted.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png.meta index 3b00b4c..7b3dba9 100644 --- a/Assets/GUI/UITextures/GUI.Inverted.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 7068eaecd68c2f341b7386d155509882 -timeCreated: 1449314286 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 3, y: 3, z: 3, w: 3} - spritePixelsToUnits: 2 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 7068eaecd68c2f341b7386d155509882 +timeCreated: 1449314286 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 2 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/GUI.Inverted2.png b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png similarity index 100% rename from Assets/GUI/UITextures/GUI.Inverted2.png rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png diff --git a/Assets/GUI/UITextures/GUI.Inverted2.png.meta b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png.meta similarity index 95% rename from Assets/GUI/UITextures/GUI.Inverted2.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png.meta index bb7ce03..9f1861d 100644 --- a/Assets/GUI/UITextures/GUI.Inverted2.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 99cfc7bc65b4343478d39c84e04a0005 -timeCreated: 1449316125 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 3, y: 3, z: 3, w: 3} - spritePixelsToUnits: 2 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 99cfc7bc65b4343478d39c84e04a0005 +timeCreated: 1449316125 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 2 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/GUI.base.png b/Assets/CivMarsEngine/GUI/UITextures/GUI.base.png similarity index 100% rename from Assets/GUI/UITextures/GUI.base.png rename to Assets/CivMarsEngine/GUI/UITextures/GUI.base.png diff --git a/Assets/GUI/UITextures/GUI.base.png.meta b/Assets/CivMarsEngine/GUI/UITextures/GUI.base.png.meta similarity index 95% rename from Assets/GUI/UITextures/GUI.base.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/GUI.base.png.meta index e2fbeda..e99c6a3 100644 --- a/Assets/GUI/UITextures/GUI.base.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/GUI.base.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 7fc277f0bb101e04ca1c0188b8f16d59 -timeCreated: 1449080092 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 3, y: 3, z: 3, w: 3} - spritePixelsToUnits: 2 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 7fc277f0bb101e04ca1c0188b8f16d59 +timeCreated: 1449080092 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 2 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Noise.mat b/Assets/CivMarsEngine/GUI/UITextures/Noise.mat similarity index 100% rename from Assets/GUI/UITextures/Noise.mat rename to Assets/CivMarsEngine/GUI/UITextures/Noise.mat diff --git a/Assets/GUI/UITextures/Noise.mat.meta b/Assets/CivMarsEngine/GUI/UITextures/Noise.mat.meta similarity index 95% rename from Assets/GUI/UITextures/Noise.mat.meta rename to Assets/CivMarsEngine/GUI/UITextures/Noise.mat.meta index d9ffeaa..9ce9e12 100644 --- a/Assets/GUI/UITextures/Noise.mat.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Noise.mat.meta @@ -1,8 +1,8 @@ -fileFormatVersion: 2 -guid: d6713d1ba52181a4486dc7cb3c150e82 -timeCreated: 1448806667 -licenseType: Free -NativeFormatImporter: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: d6713d1ba52181a4486dc7cb3c150e82 +timeCreated: 1448806667 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/NoiseEffectGrain.png b/Assets/CivMarsEngine/GUI/UITextures/NoiseEffectGrain.png similarity index 100% rename from Assets/GUI/UITextures/NoiseEffectGrain.png rename to Assets/CivMarsEngine/GUI/UITextures/NoiseEffectGrain.png diff --git a/Assets/GUI/UITextures/NoiseEffectGrain.png.meta b/Assets/CivMarsEngine/GUI/UITextures/NoiseEffectGrain.png.meta similarity index 95% rename from Assets/GUI/UITextures/NoiseEffectGrain.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/NoiseEffectGrain.png.meta index 6f4b90a..a9a1333 100644 --- a/Assets/GUI/UITextures/NoiseEffectGrain.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/NoiseEffectGrain.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: ffa9c02760c2b4e8eb9814ec06c4b05b -timeCreated: 1448806696 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapMode: 0 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: ffa9c02760c2b4e8eb9814ec06c4b05b +timeCreated: 1448806696 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Ring.full.png b/Assets/CivMarsEngine/GUI/UITextures/Ring.full.png similarity index 100% rename from Assets/GUI/UITextures/Ring.full.png rename to Assets/CivMarsEngine/GUI/UITextures/Ring.full.png diff --git a/Assets/GUI/UITextures/Ring.full.png.meta b/Assets/CivMarsEngine/GUI/UITextures/Ring.full.png.meta similarity index 100% rename from Assets/GUI/UITextures/Ring.full.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/Ring.full.png.meta diff --git a/Assets/GUI/UITextures/Ring.png b/Assets/CivMarsEngine/GUI/UITextures/Ring.png similarity index 100% rename from Assets/GUI/UITextures/Ring.png rename to Assets/CivMarsEngine/GUI/UITextures/Ring.png diff --git a/Assets/GUI/UITextures/Ring.png.meta b/Assets/CivMarsEngine/GUI/UITextures/Ring.png.meta similarity index 95% rename from Assets/GUI/UITextures/Ring.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/Ring.png.meta index 947c889..a2d489a 100644 --- a/Assets/GUI/UITextures/Ring.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Ring.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 2da70774bb3fb1a4ca35de73be77aed9 -timeCreated: 1449241165 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 2 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 256 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 2da70774bb3fb1a4ca35de73be77aed9 +timeCreated: 1449241165 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 2 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 256 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/Ring2.png b/Assets/CivMarsEngine/GUI/UITextures/Ring2.png similarity index 100% rename from Assets/GUI/UITextures/Ring2.png rename to Assets/CivMarsEngine/GUI/UITextures/Ring2.png diff --git a/Assets/GUI/UITextures/Ring2.png.meta b/Assets/CivMarsEngine/GUI/UITextures/Ring2.png.meta similarity index 95% rename from Assets/GUI/UITextures/Ring2.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/Ring2.png.meta index af6d751..a9eae88 100644 --- a/Assets/GUI/UITextures/Ring2.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/Ring2.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: bbc55cc13fc683247ad356f7da2bd5b4 -timeCreated: 1449255822 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: bbc55cc13fc683247ad356f7da2bd5b4 +timeCreated: 1449255822 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/SideMenu.png b/Assets/CivMarsEngine/GUI/UITextures/SideMenu.png similarity index 100% rename from Assets/GUI/UITextures/SideMenu.png rename to Assets/CivMarsEngine/GUI/UITextures/SideMenu.png diff --git a/Assets/GUI/UITextures/SideMenu.png.meta b/Assets/CivMarsEngine/GUI/UITextures/SideMenu.png.meta similarity index 95% rename from Assets/GUI/UITextures/SideMenu.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/SideMenu.png.meta index b3ebdd6..64d3edd 100644 --- a/Assets/GUI/UITextures/SideMenu.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/SideMenu.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 52b199ad536282a44970513f637512c1 -timeCreated: 1448801260 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 1 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 52b199ad536282a44970513f637512c1 +timeCreated: 1448801260 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 1 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/SideMenuv2.png b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv2.png similarity index 100% rename from Assets/GUI/UITextures/SideMenuv2.png rename to Assets/CivMarsEngine/GUI/UITextures/SideMenuv2.png diff --git a/Assets/GUI/UITextures/SideMenuv2.png.meta b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv2.png.meta similarity index 95% rename from Assets/GUI/UITextures/SideMenuv2.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/SideMenuv2.png.meta index 5008965..1baae22 100644 --- a/Assets/GUI/UITextures/SideMenuv2.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv2.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 6867f2a1f077fa548892daa44aacd7c2 -timeCreated: 1448802831 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 0 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 1 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 6867f2a1f077fa548892daa44aacd7c2 +timeCreated: 1448802831 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 0 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 1 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/SideMenuv3.png b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv3.png similarity index 100% rename from Assets/GUI/UITextures/SideMenuv3.png rename to Assets/CivMarsEngine/GUI/UITextures/SideMenuv3.png diff --git a/Assets/GUI/UITextures/SideMenuv3.png.meta b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv3.png.meta similarity index 95% rename from Assets/GUI/UITextures/SideMenuv3.png.meta rename to Assets/CivMarsEngine/GUI/UITextures/SideMenuv3.png.meta index f8f5a83..5f4d3f3 100644 --- a/Assets/GUI/UITextures/SideMenuv3.png.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/SideMenuv3.png.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: 81f19520dc61ae6448cc2dccd52581a9 -timeCreated: 1448904895 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: 0 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 1 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 1 - alphaIsTransparency: 1 - textureType: 8 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 81f19520dc61ae6448cc2dccd52581a9 +timeCreated: 1448904895 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: 0 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 1 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg b/Assets/CivMarsEngine/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg similarity index 100% rename from Assets/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg rename to Assets/CivMarsEngine/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg diff --git a/Assets/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta b/Assets/CivMarsEngine/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta similarity index 95% rename from Assets/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta rename to Assets/CivMarsEngine/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta index 81d6769..19cfd73 100644 --- a/Assets/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta +++ b/Assets/CivMarsEngine/GUI/UITextures/depositphotos_21124905-1920x1080-video---noise-on-a-green-old-TV-screen.jpg.meta @@ -1,56 +1,56 @@ -fileFormatVersion: 2 -guid: c213f44e2f12ef143a08457fad8b736c -timeCreated: 1448806884 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: 16 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: c213f44e2f12ef143a08457fad8b736c +timeCreated: 1448806884 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/GameController.cs b/Assets/CivMarsEngine/GameController.cs new file mode 100644 index 0000000..59052b4 --- /dev/null +++ b/Assets/CivMarsEngine/GameController.cs @@ -0,0 +1,221 @@ +using UnityEngine; +using UnityEngine.SceneManagement; +using System.Collections; +using UnityEngine.UI; +using System; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; +using System.Collections.Generic; + +using CivMarsEngine.Registry; + +namespace CivMarsEngine +{ + public class GameController : MonoBehaviour + { + + public GameState gameS; + + //Gui + public int CanTurnOf; + IHasGui OpendGui; + + public Map map; + public Player playerclass; + + //settings + public int language; + + //UI + public GUIHandler guiHandler; + + public AssetsLoader Registry; + + //Map + public SavedMapData mapData; + + //Loading + AsyncOperation loadingmap; + + //Saved + public List savedMaps = new List(); + + void Awake() + { + Registry = this.GetComponent(); + } + + void Start() + { + Registry.CallRegister(); + + loadingmap = new AsyncOperation(); + DontDestroyOnLoad(transform.gameObject); + StartCoroutine(LoadLevel("Start")); + + gameS = GameState.MainManu; + } + + + public IEnumerator LoadLevel(string a) + { + + loadingmap = SceneManager.LoadSceneAsync(a); + + while (!loadingmap.isDone) + { + yield return loadingmap; + } + + loadingmap = null; + } + + public void Update() + { + if (gameS == GameState.Gui) + { + playerclass.GetComponent().isKinematic = true; + } + else if (gameS != GameState.MainManu) + { + playerclass.GetComponent().isKinematic = false; + } + } + + public bool HasOpendGui() + { + if (OpendGui == null) + { + return false; + } + else + { + return true; + } + } + + public bool AlloweGUI(IHasGui hasGui) + { + if (OpendGui != null) + { + CanTurnOf = OpendGui.ClosingLevel(); + } + if (CanTurnOf <= hasGui.ClosingLevel()) + { + if (OpendGui != null) + { + OpendGui.Close(); + } + OpendGui = hasGui; + + CanTurnOf = hasGui.ClosingLevel(); + + gameS = GameState.Gui; + return true; + } + else + { + return false; + } + } + + public void CloseGUI(IHasGui hasGui) + { + if (OpendGui != null) + { + OpendGui.Close(); + } + OpendGui = null; + gameS = GameState.InGame; + CanTurnOf = -1; + } + + void OnLevelWasLoaded(int level) + { + if (SceneManager.GetActiveScene().name == "Main") + { + guiHandler = GameObject.Find("_GUIHandler").GetComponent(); + map = GameObject.Find("Map").GetComponent(); + playerclass = GameObject.FindGameObjectWithTag("Player").GetComponent(); + + if (gameS == GameState.MainManu) + { + Debug.Log("Jeej!"); + + map.LoadMap(mapData); + + gameS = GameState.InGame; + + Camera.main.GetComponent().MapLoaded(); + } + + } + + } + + public void TogleAccesPanel() + { + guiHandler.AccesPanel.TogelGui(); + } + + public void ChangeLanguage(int num) + { + language = num; + } + + public void LoadMaps() + { + string[] files = Directory.GetFiles("./saves", "*.ddc", SearchOption.AllDirectories); + + for (int i = 0; i < savedMaps.Count; i++) + { + savedMaps.RemoveAt(i); + } + + foreach (string file in files) + { + IFormatter formatter = new BinaryFormatter(); + Stream stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read); + SavedMapData.DisplayDeteals obj = (SavedMapData.DisplayDeteals)formatter.Deserialize(stream); + savedMaps.Add(obj); + stream.Close(); + } + } + + public SavedMapData GetSavedMap(string path) + { + IFormatter formatter = new BinaryFormatter(); + Stream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); + SavedMapData obj = (SavedMapData)formatter.Deserialize(stream); + stream.Close(); + + return obj; + } + + + public void SaveMap() + { + mapData = map.Save(); + + DirectoryInfo a = Directory.CreateDirectory("./saves/" + mapData.name); + + IFormatter formatter = new BinaryFormatter(); + Stream stream = new FileStream("./saves/" + mapData.name + "/" + mapData.name + ".bin", FileMode.Create, FileAccess.Write, FileShare.None); + formatter.Serialize(stream, mapData); + stream.Close(); + + //IFormatter formatter = new BinaryFormatter(); + stream = new FileStream("./saves/" + mapData.name + "/" + mapData.name + ".ddc", FileMode.Create, FileAccess.Write, FileShare.None); + formatter.Serialize(stream, mapData.GetDeteails()); + stream.Close(); + + } + + public void QuitGame() + { + SceneManager.LoadScene("Start"); + gameS = GameState.MainManu; + } + } +} diff --git a/Assets/GameController.cs.meta b/Assets/CivMarsEngine/GameController.cs.meta similarity index 76% rename from Assets/GameController.cs.meta rename to Assets/CivMarsEngine/GameController.cs.meta index d9cb6f4..3f298cd 100644 --- a/Assets/GameController.cs.meta +++ b/Assets/CivMarsEngine/GameController.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 320ec5351dc05ce4db4c662602605fef -timeCreated: 1437579355 +guid: 1e36b345d7bb3994a8e4fbb07d484cdb +timeCreated: 1450798792 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/GameState.cs b/Assets/CivMarsEngine/GameState.cs similarity index 92% rename from Assets/GameState.cs rename to Assets/CivMarsEngine/GameState.cs index 07adc40..d72a89a 100644 --- a/Assets/GameState.cs +++ b/Assets/CivMarsEngine/GameState.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public enum GameState -{ - InGame, - Gui, - MainManu - -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +public enum GameState +{ + InGame, + Gui, + MainManu + +} diff --git a/Assets/GameState.cs.meta b/Assets/CivMarsEngine/GameState.cs.meta similarity index 76% rename from Assets/GameState.cs.meta rename to Assets/CivMarsEngine/GameState.cs.meta index e81ca11..8d9d553 100644 --- a/Assets/GameState.cs.meta +++ b/Assets/CivMarsEngine/GameState.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 00abcc33a9d59124bb0390ff1f5758ac -timeCreated: 1438938039 +guid: bf54339ba6c85374f93dc72a98c2d379 +timeCreated: 1450798793 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/GasSystem.meta b/Assets/CivMarsEngine/GasSystem.meta similarity index 67% rename from Assets/GasSystem.meta rename to Assets/CivMarsEngine/GasSystem.meta index 4d50a86..649f431 100644 --- a/Assets/GasSystem.meta +++ b/Assets/CivMarsEngine/GasSystem.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d4a0b8fcf005b594ca6a3c983061d0d9 +guid: 3f4538e88980d9d4eabf0ca83a89799c folderAsset: yes -timeCreated: 1440689280 +timeCreated: 1450798791 licenseType: Free DefaultImporter: userData: diff --git a/Assets/GasSystem/GasObiects.cd b/Assets/CivMarsEngine/GasSystem/GasObiects.cd similarity index 97% rename from Assets/GasSystem/GasObiects.cd rename to Assets/CivMarsEngine/GasSystem/GasObiects.cd index 009644f..26944cb 100644 --- a/Assets/GasSystem/GasObiects.cd +++ b/Assets/CivMarsEngine/GasSystem/GasObiects.cd @@ -1,33 +1,33 @@ - - - - - - AAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA= - Assets\GasSystem\GasDesplay.cs - - - - - - - AAAAAAAAAAAAAAAEAAAAEQAAAAAAgCAAAAAAAAAAAAA= - Assets\GasSystem\GasTank.cs - - - - - - AAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Assets\GasSystem\IGasTank.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAIAAAAAAAAAA= - Assets\GasSystem\GasType.cs - - - + + + + + + AAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA= + Assets\GasSystem\GasDesplay.cs + + + + + + + AAAAAAAAAAAAAAAEAAAAEQAAAAAAgCAAAAAAAAAAAAA= + Assets\GasSystem\GasTank.cs + + + + + + AAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\GasSystem\IGasTank.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAIAAAAAAAAAA= + Assets\GasSystem\GasType.cs + + + \ No newline at end of file diff --git a/Assets/GasSystem/GasObiects.cd.meta b/Assets/CivMarsEngine/GasSystem/GasObiects.cd.meta similarity index 100% rename from Assets/GasSystem/GasObiects.cd.meta rename to Assets/CivMarsEngine/GasSystem/GasObiects.cd.meta diff --git a/Assets/GasSystem/GasSystem.dgml b/Assets/CivMarsEngine/GasSystem/GasSystem.dgml similarity index 99% rename from Assets/GasSystem/GasSystem.dgml rename to Assets/CivMarsEngine/GasSystem/GasSystem.dgml index 2181120..cf57735 100644 --- a/Assets/GasSystem/GasSystem.dgml +++ b/Assets/CivMarsEngine/GasSystem/GasSystem.dgml @@ -1,43 +1,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/GasSystem/GasSystem.dgml.meta b/Assets/CivMarsEngine/GasSystem/GasSystem.dgml.meta similarity index 100% rename from Assets/GasSystem/GasSystem.dgml.meta rename to Assets/CivMarsEngine/GasSystem/GasSystem.dgml.meta diff --git a/Assets/CivMarsEngine/GasSystem/GasTank.cs b/Assets/CivMarsEngine/GasSystem/GasTank.cs new file mode 100644 index 0000000..e809f57 --- /dev/null +++ b/Assets/CivMarsEngine/GasSystem/GasTank.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; + + +namespace CivMarsEngine +{ + public class GasTank + { + public GasType gasType; + public float amount; + public float maxAmount; + public bool locked; + + public GasTank(float max) + { + this.maxAmount = max; + } + + public bool CanAccept() + { + return true; + } + + public float AddAmount(float addAmount) + { + amount += addAmount; + if (amount <= maxAmount) + { + return 0; + } + else + { + float reamaining = amount - maxAmount; + amount = maxAmount; + return reamaining; + } + } + + public float AddAmount(float addAmount, GasType t) + { + if (t == gasType) + { + return AddAmount(addAmount); + } + else if (amount == 0 && gasType == GasType.Null) + { + gasType = t; + return AddAmount(addAmount); + } + return -1; + } + + public float RemoveAmount(float remAmount) + { + float old = amount; + amount -= remAmount; + if (amount >= 0) + { + return 0; + } + else + { + float reamaining = remAmount - old; + amount = 0; + if (!locked) + { + gasType = GasType.Null; + } + return reamaining; + } + } + + public void RemoveAmount(float remAmount, GasType t) + { + if (t == gasType) + { + RemoveAmount(remAmount); + } + } + + public void Transfer(GasTank other, float transAmount) + { + GasType b = gasType; + if (other.gasType == gasType || other.gasType == GasType.Null) + { + float rem = this.RemoveAmount(transAmount); + if (rem == 0) + { + other.AddAmount(transAmount, b); + } + else + { + Debug.Log(rem); + other.AddAmount(rem, b); + } + } + } + + public void SetLocked(bool a) + { + locked = a; + } + } +} \ No newline at end of file diff --git a/Assets/GasSystem/GasTank.cs.meta b/Assets/CivMarsEngine/GasSystem/GasTank.cs.meta similarity index 100% rename from Assets/GasSystem/GasTank.cs.meta rename to Assets/CivMarsEngine/GasSystem/GasTank.cs.meta diff --git a/Assets/CivMarsEngine/GasSystem/GasTankCluster.cs b/Assets/CivMarsEngine/GasSystem/GasTankCluster.cs new file mode 100644 index 0000000..27eea50 --- /dev/null +++ b/Assets/CivMarsEngine/GasSystem/GasTankCluster.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; + +namespace CivMarsEngine +{ + public class GasTankCluster + { + GasTank[] tanks; + + public int size; + + public GasTankCluster(int i, float[] max) + { + tanks = new GasTank[i]; + size = i; + for (int k = 0; k < i; k++) + { + tanks[k] = new GasTank(max[k]); + } + } + + public float AddGas(float rAmount, GasType t) + { + float size = rAmount; + + foreach (GasTank item in tanks) + { + + if (item.gasType != GasType.Null) + { + + if (item.gasType == t) + { + Debug.Log(item.gasType); + + size = item.AddAmount(rAmount); + + Debug.Log("Inventory added: " + item.gasType + " Amount: " + item.amount); + if (size == 0) + { + return 0; + } + rAmount = size; + } + } + } + + for (int i = 0; i < 10; i++) + { + if (tanks[i] == null) + { + tanks[i].AddAmount(rAmount); + return rAmount; + } + } + if (rAmount == 0) + { + return 0; + } + else + { + return rAmount; + } + } + + + public GasTank GetTank(int i) + { + return tanks[i]; + } + + public GasTank GetTank(GasType i) + { + foreach (var item in tanks) + { + if (item.gasType == i) + { + return item; + } + } + return null; + + } + + public List GetTanks(GasType i) + { + List a = new List(); + + foreach (var item in tanks) + { + if (item.gasType == i) + { + a.Add(item); + } + } + if (a.Count == 0) + { + return null; + } + return a; + + } + } +} \ No newline at end of file diff --git a/Assets/GasSystem/GasTankCluster.cs.meta b/Assets/CivMarsEngine/GasSystem/GasTankCluster.cs.meta similarity index 100% rename from Assets/GasSystem/GasTankCluster.cs.meta rename to Assets/CivMarsEngine/GasSystem/GasTankCluster.cs.meta diff --git a/Assets/GasSystem/GasType.cs b/Assets/CivMarsEngine/GasSystem/GasType.cs similarity index 52% rename from Assets/GasSystem/GasType.cs rename to Assets/CivMarsEngine/GasSystem/GasType.cs index 933e5ce..8ecc1cf 100644 --- a/Assets/GasSystem/GasType.cs +++ b/Assets/CivMarsEngine/GasSystem/GasType.cs @@ -1,11 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public enum GasType -{ - Null, - Oxigen, - CarbonDeOxide +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public enum GasType + { + Null, + Oxigen, + CarbonDeOxide + } } \ No newline at end of file diff --git a/Assets/GasSystem/GasType.cs.meta b/Assets/CivMarsEngine/GasSystem/GasType.cs.meta similarity index 100% rename from Assets/GasSystem/GasType.cs.meta rename to Assets/CivMarsEngine/GasSystem/GasType.cs.meta diff --git a/Assets/GasSystem/IGasTank.cs b/Assets/CivMarsEngine/GasSystem/IGasTank.cs similarity index 50% rename from Assets/GasSystem/IGasTank.cs rename to Assets/CivMarsEngine/GasSystem/IGasTank.cs index 90c026a..442d044 100644 --- a/Assets/GasSystem/IGasTank.cs +++ b/Assets/CivMarsEngine/GasSystem/IGasTank.cs @@ -1,9 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public interface IGasTank -{ - GasTankCluster GetTankCluster(); +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public interface IGasTank + { + GasTankCluster GetTankCluster(); + } } \ No newline at end of file diff --git a/Assets/GasSystem/IGasTank.cs.meta b/Assets/CivMarsEngine/GasSystem/IGasTank.cs.meta similarity index 100% rename from Assets/GasSystem/IGasTank.cs.meta rename to Assets/CivMarsEngine/GasSystem/IGasTank.cs.meta diff --git a/Assets/CivMarsEngine/InputHandler.cs b/Assets/CivMarsEngine/InputHandler.cs new file mode 100644 index 0000000..5c6ed8e --- /dev/null +++ b/Assets/CivMarsEngine/InputHandler.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using System.Collections; +using CivMarsEngine; + +namespace CivMarsEngine +{ + public class InputHandler : MonoBehaviour + { + + public GameController GameCon; + + // Use this for initialization + void Start() + { + GameCon = GameObject.Find("_GameController").GetComponent(); + } + + void Awake() + { + DontDestroyOnLoad(transform.gameObject); + } + /* + // Update is called once per frame + void Update() + { + + if (GameCon.gameIsOn) + { + //Debug.Log("Check key"); + + if (Input.GetButtonUp("Mine") && (GameCon.gameS == GameState.InGame)) + { + Debug.Log("Mine"); + GameCon.playerclass.MineStar(); + } + } + + } + */ + } +} \ No newline at end of file diff --git a/Assets/InputHandler.cs.meta b/Assets/CivMarsEngine/InputHandler.cs.meta similarity index 76% rename from Assets/InputHandler.cs.meta rename to Assets/CivMarsEngine/InputHandler.cs.meta index 63328bb..8a5f0d3 100644 --- a/Assets/InputHandler.cs.meta +++ b/Assets/CivMarsEngine/InputHandler.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 279588099dc661349b5027691e78465b -timeCreated: 1438325158 +guid: 7d787404efa9b9d4f96bff82f6ca28d0 +timeCreated: 1450798793 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/Interfaces.meta b/Assets/CivMarsEngine/Interfaces.meta similarity index 67% rename from Assets/Interfaces.meta rename to Assets/CivMarsEngine/Interfaces.meta index 169d4f0..5c836fa 100644 --- a/Assets/Interfaces.meta +++ b/Assets/CivMarsEngine/Interfaces.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a31f7f261a24252498e6f30e806344a0 +guid: 66725c71f87e27f4295f5d503fe8062a folderAsset: yes -timeCreated: 1443810980 +timeCreated: 1450798791 licenseType: Free DefaultImporter: userData: diff --git a/Assets/CivMarsEngine/Interfaces/IBuildable.cs b/Assets/CivMarsEngine/Interfaces/IBuildable.cs new file mode 100644 index 0000000..aa7248c --- /dev/null +++ b/Assets/CivMarsEngine/Interfaces/IBuildable.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using UnityEngine.UI; + +namespace CivMarsEngine +{ + public interface IBuildable + { + float GetBuildtime(); + + Sprite GetImage(); + + GameObject GetPrefab(); + + Image GetBuildedState(); + + Item[] GetNeededMaterials(); + + void Setup(); + } +} \ No newline at end of file diff --git a/Assets/Interfaces/IBuildable.cs.meta b/Assets/CivMarsEngine/Interfaces/IBuildable.cs.meta similarity index 100% rename from Assets/Interfaces/IBuildable.cs.meta rename to Assets/CivMarsEngine/Interfaces/IBuildable.cs.meta diff --git a/Assets/CivMarsEngine/Interfaces/ICrafter.cs b/Assets/CivMarsEngine/Interfaces/ICrafter.cs new file mode 100644 index 0000000..582da27 --- /dev/null +++ b/Assets/CivMarsEngine/Interfaces/ICrafter.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public interface ICrafter + { + void AddToQueue(int i); + + void RemoveFromQueue(int i); + + CraftingProcess[] GetQueue(); + + string GetCraftingID(); + + } +} \ No newline at end of file diff --git a/Assets/Crafting/ICrafter.cs.meta b/Assets/CivMarsEngine/Interfaces/ICrafter.cs.meta similarity index 100% rename from Assets/Crafting/ICrafter.cs.meta rename to Assets/CivMarsEngine/Interfaces/ICrafter.cs.meta diff --git a/Assets/CivMarsEngine/Interfaces/IHasGui.cs b/Assets/CivMarsEngine/Interfaces/IHasGui.cs new file mode 100644 index 0000000..8558f76 --- /dev/null +++ b/Assets/CivMarsEngine/Interfaces/IHasGui.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public interface IHasGui + { + void TogelGui(); + + void Open(); + + void Close(); + + int ClosingLevel(); + + + } +} \ No newline at end of file diff --git a/Assets/Interfaces/IHasGui.cs.meta b/Assets/CivMarsEngine/Interfaces/IHasGui.cs.meta similarity index 100% rename from Assets/Interfaces/IHasGui.cs.meta rename to Assets/CivMarsEngine/Interfaces/IHasGui.cs.meta diff --git a/Assets/GUI/GuiType.cs b/Assets/CivMarsEngine/Interfaces/IRegystratabe.cs similarity index 54% rename from Assets/GUI/GuiType.cs rename to Assets/CivMarsEngine/Interfaces/IRegystratabe.cs index 68a67c4..936f034 100644 --- a/Assets/GUI/GuiType.cs +++ b/Assets/CivMarsEngine/Interfaces/IRegystratabe.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - public enum GuiType - { - Closable, - UnClosable, - None - } - +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public interface IRegystratabe + { + void Regystrate(); + } +} \ No newline at end of file diff --git a/Assets/Interfaces/IRegystratabe.cs.meta b/Assets/CivMarsEngine/Interfaces/IRegystratabe.cs.meta similarity index 100% rename from Assets/Interfaces/IRegystratabe.cs.meta rename to Assets/CivMarsEngine/Interfaces/IRegystratabe.cs.meta diff --git a/Assets/CivMarsEngine/Interfaces/ISaveble.cs b/Assets/CivMarsEngine/Interfaces/ISaveble.cs new file mode 100644 index 0000000..dad12ad --- /dev/null +++ b/Assets/CivMarsEngine/Interfaces/ISaveble.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; + +namespace CivMarsEngine +{ + interface ISaveble + { + SavedTile Save(); + + void Load(SavedTile data); + + GameObject GetPrefab(); + } +} \ No newline at end of file diff --git a/Assets/Interfaces/ISaveble.cs.meta b/Assets/CivMarsEngine/Interfaces/ISaveble.cs.meta similarity index 100% rename from Assets/Interfaces/ISaveble.cs.meta rename to Assets/CivMarsEngine/Interfaces/ISaveble.cs.meta diff --git a/Assets/CivMarsEngine/Interfaces/IWorldGen.cs b/Assets/CivMarsEngine/Interfaces/IWorldGen.cs new file mode 100644 index 0000000..f168348 --- /dev/null +++ b/Assets/CivMarsEngine/Interfaces/IWorldGen.cs @@ -0,0 +1,8 @@ + +namespace CivMarsEngine +{ + public interface IWorldGen + { + void Generate(System.Random r, TileMap map); + } +} \ No newline at end of file diff --git a/Assets/Interfaces/IWorldGen.cs.meta b/Assets/CivMarsEngine/Interfaces/IWorldGen.cs.meta similarity index 95% rename from Assets/Interfaces/IWorldGen.cs.meta rename to Assets/CivMarsEngine/Interfaces/IWorldGen.cs.meta index 7354591..7864fb8 100644 --- a/Assets/Interfaces/IWorldGen.cs.meta +++ b/Assets/CivMarsEngine/Interfaces/IWorldGen.cs.meta @@ -1,12 +1,12 @@ -fileFormatVersion: 2 -guid: 9e261beaea0c372429f7583c092894a3 -timeCreated: 1446131198 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 9e261beaea0c372429f7583c092894a3 +timeCreated: 1446131198 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/InventorySystem.meta b/Assets/CivMarsEngine/InventorySystem.meta new file mode 100644 index 0000000..bd6d71c --- /dev/null +++ b/Assets/CivMarsEngine/InventorySystem.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a5196bf8aa5eecc40b41709dd8837d4c +folderAsset: yes +timeCreated: 1450798791 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CivMarsEngine/InventorySystem/IInventory.cs b/Assets/CivMarsEngine/InventorySystem/IInventory.cs new file mode 100644 index 0000000..92f79dc --- /dev/null +++ b/Assets/CivMarsEngine/InventorySystem/IInventory.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CivMarsEngine +{ + public interface IInventory + { + //Inventory GetInventory(); + + + /// + /// Returns the number of slots in the inventory. + /// + /// + int GetInventorySize(); + + /// + /// Returns the name of the inventory + /// + /// + String GetInventoryName(); + + /// + /// Returns if the inventory is named + /// + /// True if named + bool HasCustomInventoryName(); + + /// + /// Returns the item in slot i + /// + /// + /// + Item GetStackInSlot(int i); + + /// + /// Returns the maximum stack size for a inventory slot. + /// + /// + /// + int GetInventoryStackLimit(int i); + + /// + /// Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. + /// + /// Number of the slot + /// The item + /// True if allowed + bool IsItemValidForSlot(int slot, Item givenItem); + + //Do not make give this method the name canInteractWith because it clashes with Container + bool IsUseableByPlayer(Player p_70300_1_); + + //Adds the item to the inventory returns the remained amount + Item Add(Item i); + + //Removes the item to the inventory returns the remained amount + Item Remove(Item i); + + /// + /// Transfers a item from this inventory to a other + /// + /// other inv to transfer to + /// this inventorys index to transfer + void TransferItem(IInventory ToInv, int index); + + /// + /// Transfers a specific amount of a item from this inventory to a other + /// + /// other inv to transfer to + /// this inventorys index to transfer + /// amount to tramsfer + void TransferItemAmount(IInventory Toinv, int fromindex, int transferingAmount); + } +} \ No newline at end of file diff --git a/Assets/Interfaces/IInventory.cs.meta b/Assets/CivMarsEngine/InventorySystem/IInventory.cs.meta similarity index 100% rename from Assets/Interfaces/IInventory.cs.meta rename to Assets/CivMarsEngine/InventorySystem/IInventory.cs.meta diff --git a/Assets/CivMarsEngine/InventorySystem/Inventory.cs b/Assets/CivMarsEngine/InventorySystem/Inventory.cs new file mode 100644 index 0000000..ed48957 --- /dev/null +++ b/Assets/CivMarsEngine/InventorySystem/Inventory.cs @@ -0,0 +1,215 @@ +using UnityEngine; +using System.Collections; +using System; + +namespace CivMarsEngine +{ + [System.Serializable] + public class Inventory + { + + public Item[] inventory; + + public int size; + + + public Inventory(int InventorySize) + { + if (InventorySize < 1) + Debug.LogErrorFormat("Inventory size can't be less than 0", this); + inventory = new Item[InventorySize]; + this.size = InventorySize; + } + + + public Item Add(Item adding) + { + //int size = adding.amount; + + foreach (Item item in inventory) + { + if (item != null) + { + if (item.GetType() == adding.GetType()) + { + //Debug.Log(adding.GetType()); + adding.amount = item.Add(adding.amount); + + Debug.Log("Inventory added: " + item.GetType() + " Amount: " + adding.amount); + + if (adding.amount == -1) + { + return null; + } + } + } + } + + for (int i = 0; i < size; i++) + { + if (inventory[i] == null) + { + inventory[i] = adding; + return null; + } + } + + return null; + + } + + + public Item Remove(Item removing) + { + for (int i = 0; i < inventory.GetLength(0); i++) + { + Item item = inventory[i]; + if (item != null) + { + if (item.GetType() == removing.GetType()) + { + //Debug.Log(adding.GetType()); + removing.amount = item.Remove(removing.amount); + Debug.Log("Inventory added: " + item.GetType() + " Amount: " + item.amount); + + Check(i); + + + } + } + } + if (removing.amount == -1) + { + return null; + } + return removing; + + } + + void Check(int i) + { + if (inventory[i].amount <= 0) + { + inventory[i] = null; + } + } + + /// + /// Remove item at index + /// + /// index of the item + public void Remove(int index) + { + inventory[index] = null; + } + + + /// + /// Remove amount from item at index + /// + /// index of the item + /// amount to remove + public int Remove(int index, int amount) + { + int remaining = inventory[index].Remove(amount); + if (remaining >= 0) + { + inventory[index] = null; + return -1; + } + return remaining; + + } + + /// + /// Finds the Iten witch is T + /// Returns null if not found + /// + /// Type of item + /// The first item witch matches + public Item Find() + { + foreach (Item i in inventory) + { + if (i is T) + { + return i; + } + } + + return null; + } + + /// + /// Gives the item at the index + /// + /// index + /// Item + public Item Get(int i) + { + return inventory[i]; + } + + /// + /// Transfers a item from this inventory to a other + /// + /// other inv to transfer to + /// this inventorys index to transfer + public void TransferItem(IInventory ToInv, int fromindex) + { + Item r = ToInv.Add(this.Get(fromindex)); + if (r != null) + this.Remove(fromindex, this.Get(fromindex).amount - r.amount); + else + this.Remove(fromindex); + } + + /// + /// Transfers a specific amount of a item from this inventory to a other + /// + /// other inv to transfer to + /// this inventorys index to transfer + /// amount to tramsfer + public void TransferItemAmount(IInventory ToInv, int fromindex, int transferingAmount) + { + Debug.Log(inventory[fromindex]); + + int remaining = inventory[fromindex].amount - transferingAmount; + + Item addable = (((Item)Activator.CreateInstance(null, inventory[fromindex].GetType().ToString()).Unwrap())); + + if (remaining < 0) + { + addable.amount = transferingAmount; + } + else + { + addable.amount = transferingAmount - remaining; + } + Item r = ToInv.Add(this.Get(fromindex)); + this.Remove(fromindex, this.Get(fromindex).amount - r.amount); + Check(fromindex); + } + + + /* + public int AddAmount(int rAmount, Item i) + { + if ((i.amount + rAmount) > (i.maxStackSize)) + { + int reamaining = (i.amount + rAmount) - i.maxStackSize; + i.amount = i.maxStackSize; + Debug.Log(i.amount); + return reamaining; + } + else + { + i.amount = i.amount + rAmount; + Debug.Log(i.amount); + return 0; + } + + } + */ + } +} diff --git a/Assets/Inventory.cs.meta b/Assets/CivMarsEngine/InventorySystem/Inventory.cs.meta similarity index 76% rename from Assets/Inventory.cs.meta rename to Assets/CivMarsEngine/InventorySystem/Inventory.cs.meta index 6bfd916..ff7b615 100644 --- a/Assets/Inventory.cs.meta +++ b/Assets/CivMarsEngine/InventorySystem/Inventory.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: e972b213b30b0344e9c97be76eee29d8 -timeCreated: 1437995144 +guid: da541832d6de5fd49a6b997ad67c2a30 +timeCreated: 1450798794 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/Language.cs b/Assets/CivMarsEngine/Language.cs similarity index 100% rename from Assets/Language.cs rename to Assets/CivMarsEngine/Language.cs diff --git a/Assets/Language.cs.meta b/Assets/CivMarsEngine/Language.cs.meta similarity index 76% rename from Assets/Language.cs.meta rename to Assets/CivMarsEngine/Language.cs.meta index f80e83e..a6e3f67 100644 --- a/Assets/Language.cs.meta +++ b/Assets/CivMarsEngine/Language.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: b2f26d04667fe8c44af62c54d78a8482 -timeCreated: 1437851766 +guid: 92b2e18001adf144d8096880974fe0d5 +timeCreated: 1450798793 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/Map.cs b/Assets/CivMarsEngine/Map.cs similarity index 95% rename from Assets/Map.cs rename to Assets/CivMarsEngine/Map.cs index f27528e..641a7a9 100644 --- a/Assets/Map.cs +++ b/Assets/CivMarsEngine/Map.cs @@ -1,133 +1,134 @@ -using UnityEngine; -using System.Collections; -using System.IO; - -public class Map : MonoBehaviour -{ - public int seed; - public int mapHeight = 100; - - public Vector3 posMultiplyer; - - public TileMap Generated; - public TileMap GeneratedReloaded; - public TileMap Buildings; - - public SavedMapData mapData; - - // Use this for initialization - void Start() - { - //mapGenerated = new GeneratedTile[mapHeight, mapHeight]; - - //mapBuilt = new Building[mapHeight, mapHeight]; - } - - - - public void BuildMap() - { - //987, - System.Random r = new System.Random(mapData.seed); - - foreach (IWorldGen item in GameRegystry.ores.Values) - { - item.Generate(r, Generated); - } - - /* - SavedMap a = new SavedMap(this); - a.Save("./Map.bin"); - - SavedMap b = new SavedMap("./Map.bin", this); - b.LoadFromSave(); - */ - - } - - public void AddBasicBuildings() - { - int xMpos; - xMpos = mapHeight / 2; - - TileTransform mainBuilding = Instantiate(GameRegystry.buildings[CivMars.MainBuilding.ID].gameObject).GetComponent(); - Buildings.SetTile(xMpos, xMpos, mainBuilding); - - TileTransform chest = Instantiate(GameRegystry.buildings[CivMars.Chest.ID].gameObject).GetComponent(); - Buildings.SetTile(xMpos+5, xMpos+5, chest); - - } - - - public SavedMapData Save() - { - for (int i = 0; i < mapHeight; i++) - { - for (int j = 0; j < mapHeight; j++) - { - TileTransform tile = Generated.GetTileOn(i, j); - if (tile != null) - { - Tiled t = tile.GetComponent(); - - if (t is ISaveble) - { - mapData.GeaneratedTiles[i, j] = ((ISaveble)t).Save(); - } - } - - - tile = Buildings.GetTileOn(i, j); - if (tile != null) - { - Tiled t = tile.GetComponent(); - - if (t is ISaveble) - { - mapData.BuildingTiles[i, j] = ((ISaveble)t).Save(); - } - } - } - } - - return mapData; - } - - public void LoadMap(SavedMapData savedMap) - { - mapData = savedMap; - if (mapData.generated) - { - for (int i = 0; i < mapData.height; i++) - { - for (int j = 0; j < mapData.height; j++) - { - SavedTile tile = mapData.GeaneratedTiles[i, j]; - if (tile != null) - { - if (tile is SavedOre) - { - TileTransform trans = GameObject.Instantiate(((ISaveble)GameRegystry.ores[tile.ID]).GetPrefab()).GetComponent(); - Generated.SetTile(i, j, trans); - } - } - - tile = mapData.BuildingTiles[i, j]; - if (tile != null) - { - TileTransform trans = GameObject.Instantiate(((ISaveble)GameRegystry.buildings[tile.ID]).GetPrefab()).GetComponent(); - Buildings.SetTile(i, j, trans); - } - } - } - } - else - { - BuildMap(); - AddBasicBuildings(); - mapData.SetSize(mapHeight); - mapData.generated = true; - } - } - -} +using UnityEngine; +using System.Collections; +using System.IO; +using CivMarsEngine; + +public class Map : MonoBehaviour +{ + public int seed; + public int mapHeight = 100; + + public Vector3 posMultiplyer; + + public TileMap Generated; + public TileMap GeneratedReloaded; + public TileMap Buildings; + + public SavedMapData mapData; + + // Use this for initialization + void Start() + { + //mapGenerated = new GeneratedTile[mapHeight, mapHeight]; + + //mapBuilt = new Building[mapHeight, mapHeight]; + } + + + + public void BuildMap() + { + //987, + System.Random r = new System.Random(mapData.seed); + + foreach (IWorldGen item in GameRegystry.ores.Values) + { + item.Generate(r, Generated); + } + + /* + SavedMap a = new SavedMap(this); + a.Save("./Map.bin"); + + SavedMap b = new SavedMap("./Map.bin", this); + b.LoadFromSave(); + */ + + } + + public void AddBasicBuildings() + { + int xMpos; + xMpos = mapHeight / 2; + + TileTransform mainBuilding = Instantiate(GameRegystry.buildings[CivMars.MainBuilding.ID].gameObject).GetComponent(); + Buildings.SetTile(xMpos, xMpos, mainBuilding); + + TileTransform chest = Instantiate(GameRegystry.buildings[CivMars.Chest.ID].gameObject).GetComponent(); + Buildings.SetTile(xMpos+5, xMpos+5, chest); + + } + + + public SavedMapData Save() + { + for (int i = 0; i < mapHeight; i++) + { + for (int j = 0; j < mapHeight; j++) + { + TileTransform tile = Generated.GetTileOn(i, j); + if (tile != null) + { + Tiled t = tile.GetComponent(); + + if (t is ISaveble) + { + mapData.GeaneratedTiles[i, j] = ((ISaveble)t).Save(); + } + } + + + tile = Buildings.GetTileOn(i, j); + if (tile != null) + { + Tiled t = tile.GetComponent(); + + if (t is ISaveble) + { + mapData.BuildingTiles[i, j] = ((ISaveble)t).Save(); + } + } + } + } + + return mapData; + } + + public void LoadMap(SavedMapData savedMap) + { + mapData = savedMap; + if (mapData.generated) + { + for (int i = 0; i < mapData.height; i++) + { + for (int j = 0; j < mapData.height; j++) + { + SavedTile tile = mapData.GeaneratedTiles[i, j]; + if (tile != null) + { + if (tile is SavedOre) + { + TileTransform trans = GameObject.Instantiate(((ISaveble)GameRegystry.ores[tile.ID]).GetPrefab()).GetComponent(); + Generated.SetTile(i, j, trans); + } + } + + tile = mapData.BuildingTiles[i, j]; + if (tile != null) + { + TileTransform trans = GameObject.Instantiate(((ISaveble)GameRegystry.buildings[tile.ID]).GetPrefab()).GetComponent(); + Buildings.SetTile(i, j, trans); + } + } + } + } + else + { + BuildMap(); + AddBasicBuildings(); + mapData.SetSize(mapHeight); + mapData.generated = true; + } + } + +} diff --git a/Assets/Map.cs.meta b/Assets/CivMarsEngine/Map.cs.meta similarity index 76% rename from Assets/Map.cs.meta rename to Assets/CivMarsEngine/Map.cs.meta index 46ec713..a0fd2c7 100644 --- a/Assets/Map.cs.meta +++ b/Assets/CivMarsEngine/Map.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 00eab8da0c20eba41afa8b5ca3201706 -timeCreated: 1440095782 +guid: 2aee29a8bed530d43bb6e8ed2db64b50 +timeCreated: 1450798792 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/MapLoad.cs b/Assets/CivMarsEngine/MapLoad.cs similarity index 95% rename from Assets/MapLoad.cs rename to Assets/CivMarsEngine/MapLoad.cs index 5512429..562301e 100644 --- a/Assets/MapLoad.cs +++ b/Assets/CivMarsEngine/MapLoad.cs @@ -1,118 +1,118 @@ - -/*using UnityEngine; -using System.Collections; - -public class MapLoad -{ - - - - public static void MapDraw(Map map, GameObject mapPiece, Sprite[] GeneratedSprites, GameObject[] BuildingPrefabs, float tileSize) - { - - Vector2 posMultiplyer = new Vector2((tileSize / 2), -(tileSize / 2)); - GameObject allTile = new GameObject("AllTitle"); - - Debug.Log("MapShowing started"); - - - - GameObject showLay = new GameObject(""); - showLay.transform.position = new Vector3(0, 0, 0); - showLay.transform.parent = allTile.transform; - - - - - - if (map.mapGenerated != null) - Debug.Log("OK"); - - - - Debug.Log(map.seed); - Debug.Log(map.mapHeight); - - #region load generated - for (int yPos = 0; yPos < map.mapHeight; yPos++) - { - - for (int xPos = 0; xPos < map.mapHeight; xPos++) - { - - //Debug.Log(xPos + "," + yPos); - - GameObject go = GameObject.Instantiate(mapPiece); - go.name = "Tile_" + xPos + "_" + yPos; - SpriteRenderer curr = go.GetComponent(); - - //Debug.Log(xPos + "," + yPos); - curr.sprite = GeneratedSprites[((int)map.mapGenerated[xPos, yPos].type)]; - - curr.transform.parent = showLay.transform; - - Vector2 pos = new Vector3(xPos, -yPos) * tileSize; - pos = pos + posMultiplyer; - - curr.transform.localPosition = (pos); - - //Debug.Log("Tile Done"); - } - } - #endregion - - - #region Building load OUT DATED - /* - for (int xPos = 0; xPos < map.mapHeight; xPos++) - { - - for (int yPos = 0; yPos < map.mapHeight; yPos++) - { - if (map.mapBuilt[xPos, yPos] != null) - { - //Debug.Log(xPos + "," + yPos); - - foreach (GameObject i in BuildingPrefabs) - { - Debug.Log(map.mapBuilt[xPos, yPos].GetType().ToString()); - if (i.name == map.mapBuilt[xPos, yPos].GetType().ToString()) - { - GameObject go = GameObject.Instantiate(i); - - Vector3 pos = new Vector3(yPos + posMultiplyer.x, -xPos + posMultiplyer.y, -5) * tileSize; - - go.transform.localPosition = (pos); - - break; - } - } - - - - - - //Debug.Log("Tile Done"); - } - } - } - - #endregion - - - - } - - - public static void MapUpdate(int x, int y, Map map) - { - Sprite[] sprites = Resources.LoadAll("Texturas/Generated"); - - GameObject go = GameObject.Find("Tile_" + x + "_" + y); - SpriteRenderer curr = go.GetComponent(); - - curr.sprite = sprites[((int)map.mapGenerated[x, y].type)]; - - } -} + +/*using UnityEngine; +using System.Collections; + +public class MapLoad +{ + + + + public static void MapDraw(Map map, GameObject mapPiece, Sprite[] GeneratedSprites, GameObject[] BuildingPrefabs, float tileSize) + { + + Vector2 posMultiplyer = new Vector2((tileSize / 2), -(tileSize / 2)); + GameObject allTile = new GameObject("AllTitle"); + + Debug.Log("MapShowing started"); + + + + GameObject showLay = new GameObject(""); + showLay.transform.position = new Vector3(0, 0, 0); + showLay.transform.parent = allTile.transform; + + + + + + if (map.mapGenerated != null) + Debug.Log("OK"); + + + + Debug.Log(map.seed); + Debug.Log(map.mapHeight); + + #region load generated + for (int yPos = 0; yPos < map.mapHeight; yPos++) + { + + for (int xPos = 0; xPos < map.mapHeight; xPos++) + { + + //Debug.Log(xPos + "," + yPos); + + GameObject go = GameObject.Instantiate(mapPiece); + go.name = "Tile_" + xPos + "_" + yPos; + SpriteRenderer curr = go.GetComponent(); + + //Debug.Log(xPos + "," + yPos); + curr.sprite = GeneratedSprites[((int)map.mapGenerated[xPos, yPos].type)]; + + curr.transform.parent = showLay.transform; + + Vector2 pos = new Vector3(xPos, -yPos) * tileSize; + pos = pos + posMultiplyer; + + curr.transform.localPosition = (pos); + + //Debug.Log("Tile Done"); + } + } + #endregion + + + #region Building load OUT DATED + /* + for (int xPos = 0; xPos < map.mapHeight; xPos++) + { + + for (int yPos = 0; yPos < map.mapHeight; yPos++) + { + if (map.mapBuilt[xPos, yPos] != null) + { + //Debug.Log(xPos + "," + yPos); + + foreach (GameObject i in BuildingPrefabs) + { + Debug.Log(map.mapBuilt[xPos, yPos].GetType().ToString()); + if (i.name == map.mapBuilt[xPos, yPos].GetType().ToString()) + { + GameObject go = GameObject.Instantiate(i); + + Vector3 pos = new Vector3(yPos + posMultiplyer.x, -xPos + posMultiplyer.y, -5) * tileSize; + + go.transform.localPosition = (pos); + + break; + } + } + + + + + + //Debug.Log("Tile Done"); + } + } + } + + #endregion + + + + } + + + public static void MapUpdate(int x, int y, Map map) + { + Sprite[] sprites = Resources.LoadAll("Texturas/Generated"); + + GameObject go = GameObject.Find("Tile_" + x + "_" + y); + SpriteRenderer curr = go.GetComponent(); + + curr.sprite = sprites[((int)map.mapGenerated[x, y].type)]; + + } +} */ \ No newline at end of file diff --git a/Assets/MapLoad.cs.meta b/Assets/CivMarsEngine/MapLoad.cs.meta similarity index 76% rename from Assets/MapLoad.cs.meta rename to Assets/CivMarsEngine/MapLoad.cs.meta index d3f85fa..4f45ce0 100644 --- a/Assets/MapLoad.cs.meta +++ b/Assets/CivMarsEngine/MapLoad.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 20ecd41a6485e3e46923acd480431afc -timeCreated: 1437563355 +guid: af9ec8c593e9a7d46b2f85dd51f8a3a2 +timeCreated: 1450798793 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/Assets/Player.meta b/Assets/CivMarsEngine/Player.meta similarity index 67% rename from Assets/Player.meta rename to Assets/CivMarsEngine/Player.meta index 1b674fe..580afa0 100644 --- a/Assets/Player.meta +++ b/Assets/CivMarsEngine/Player.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 385e96f64eb9ab74e89452f1ea0cf99f +guid: a161366b6ca81a1428db728b8cced795 folderAsset: yes -timeCreated: 1438242581 +timeCreated: 1450798791 licenseType: Free DefaultImporter: userData: diff --git a/Assets/CivMarsEngine/Player/Player.cs b/Assets/CivMarsEngine/Player/Player.cs new file mode 100644 index 0000000..48c29af --- /dev/null +++ b/Assets/CivMarsEngine/Player/Player.cs @@ -0,0 +1,198 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + + +namespace CivMarsEngine +{ + public class Player : MonoBehaviour, IGasTank, IInventory + { + public GameController GameCon; + + SpaceSuit suit = new SpaceSuit(); + + public float health = 1; + + OreTile mining; + + public Inventory inventory = new Inventory(10); + + public int eatSpeed; + public float breathAmount = 1; + public int speed; + + public float miningTime; + + public void Start() + { + GetTankCluster().GetTank(0).gasType = GasType.Oxigen; + GetTankCluster().GetTank(0).SetLocked(true); + GetTankCluster().GetTank(1).gasType = GasType.CarbonDeOxide; + GetTankCluster().GetTank(1).SetLocked(true); + + GetTankCluster().GetTank(0).AddAmount(GetTankCluster().GetTank(0).maxAmount); + GameCon = GameObject.Find("_GameController").GetComponent(); + + } + + void Update() + { + //Breath(); + GasTank oxigen = GetTankCluster().GetTank(0); + GasTank carbonDioxide = GetTankCluster().GetTank(1); + + float OxigenTank = oxigen.amount; + float OxigenTankFull = oxigen.maxAmount; + + float CarbonDioxideTank = carbonDioxide.amount; + float CarbonDioxideTankFull = carbonDioxide.maxAmount; + + float OxigenHp = Mathf.Clamp((OxigenTank * 5) / OxigenTankFull, 0, 1); + float CarbonDioxideHp = Mathf.Clamp(((CarbonDioxideTankFull - CarbonDioxideTank) * 5) / CarbonDioxideTankFull, 0, 1); ; + + health = + ( + ((OxigenHp) * 10) * + ((CarbonDioxideHp) * 10) + ) / Mathf.Pow(10, 2); + //Debug.Log("Deadly Carbon percent: " + CarbonDioxideHp + " Deadly Oxigen percent: " + OxigenHp + " health: "+ health); + + Mine(); + + if (Input.GetButtonUp("Mine") && (GameCon.gameS == GameState.InGame) && mining == null) + { + Debug.Log("Mine"); + MineStar(); + } + } + + public void Eat() + { + throw new System.NotImplementedException(); + } + + public void Breath() + { + GetTankCluster().GetTank(0).RemoveAmount(breathAmount * Time.deltaTime, GasType.Oxigen); + GetTankCluster().GetTank(1).AddAmount(breathAmount * Time.deltaTime, GasType.CarbonDeOxide); + } + + public void walk() + { + throw new System.NotImplementedException(); + } + + public void Mine() + { + if (mining != null) + { + if (miningTime > 0) + { + miningTime -= Time.deltaTime; + } + else + { + Item mined; + mined = ((Item)Activator.CreateInstance(mining.GetItemType())); + mined.amount = 1; + + inventory.Add(mined); + + mining.Mine(1); + + mining = null; + } + } + + } + + public void MineStar() + { + + TileVector pos = new TileVector((int)Mathf.Round(transform.position.x - 0.5f), -1 * (int)Mathf.Round(transform.position.y + 0.5f)); + TileTransform tile = GameCon.map.Generated.GetTileOn(pos); + + if (tile != null) + { + OreTile ore = ((OreTile)tile.GetComponent()); + + if (ore.GetType() != null) + { + mining = ore; + //GameCon.guiHandler.actions[0].Action(((OreTile)ore).GetMiningTime(), "Mine"); + miningTime = ((OreTile)ore).GetMiningTime(); + } + } + + } + + #region Tank + + public GasTankCluster GetTankCluster() + { + return suit.GetTankCluster(); + } + + #endregion + + #region IInventory + + public int GetInventorySize() + { + return inventory.size; + } + + public string GetInventoryName() + { + throw new NotImplementedException(); + } + + public bool HasCustomInventoryName() + { + return false; + } + + public Item GetStackInSlot(int i) + { + return inventory.Get(i); + } + + public int GetInventoryStackLimit(int i) + { + throw new NotImplementedException(); + } + + public bool IsItemValidForSlot(int slot, Item givenItem) + { + throw new NotImplementedException(); + } + + public bool IsUseableByPlayer(Player p_70300_1_) + { + return true; + } + + public Item Add(Item i) + { + return inventory.Add(i); + } + + public Item Remove(Item i) + { + return inventory.Remove(i); + } + + public void TransferItem(IInventory ToInv, int index) + { + inventory.TransferItem(ToInv, index); + } + + public void TransferItemAmount(IInventory Toinv, int fromindex, int transferingAmount) + { + inventory.TransferItemAmount(Toinv, fromindex, transferingAmount); + } + + #endregion + } + +} diff --git a/Assets/Player/Player.cs.meta b/Assets/CivMarsEngine/Player/Player.cs.meta similarity index 100% rename from Assets/Player/Player.cs.meta rename to Assets/CivMarsEngine/Player/Player.cs.meta diff --git a/Assets/Player/PlayerMovment.cs b/Assets/CivMarsEngine/Player/PlayerMovment.cs similarity index 96% rename from Assets/Player/PlayerMovment.cs rename to Assets/CivMarsEngine/Player/PlayerMovment.cs index 72a4db5..54db167 100644 --- a/Assets/Player/PlayerMovment.cs +++ b/Assets/CivMarsEngine/Player/PlayerMovment.cs @@ -1,58 +1,58 @@ -using UnityEngine; -using System.Collections; - -public class PlayerMovment : MonoBehaviour -{ - public float speed; - Animator anim; - bool presd; - - // Use this for initialization - void Start() - { - //anim = GetComponent(); - //g = GameObject.FindGameObjectWithTag ("GameController").GetComponent (); - } - - // Update is called once per frame - void Update() - { - GetComponent().angularVelocity = 0; - transform.eulerAngles = Vector3.zero; - - //if (Input.anyKey && g.gameState == Globals.GameState.InGame) { - - //anim.SetBool("Stay", false); - - if (Input.GetAxis("Horizontal") < 0) - { - gameObject.GetComponent().AddForce(new Vector2(speed * Input.GetAxis("Horizontal"), 0)); - //anim.SetInteger("Direction", 1); - } - if (Input.GetAxis("Horizontal") > 0) - { - gameObject.GetComponent().AddForce(new Vector2(speed * Input.GetAxis("Horizontal"), 0)); - //anim.SetInteger("Direction", 3); - } - if (Input.GetAxis("Vertical") < 0) - { - gameObject.GetComponent().AddForce(new Vector2(0, speed * Input.GetAxis("Vertical"))); - //anim.SetInteger("Direction", 0); - } - if (Input.GetAxis("Vertical") > 0) - { - gameObject.GetComponent().AddForce(new Vector2(0, speed * Input.GetAxis("Vertical"))); - //anim.SetInteger("Direction", 2); - } - - - - - gameObject.GetComponent().velocity = Vector2.Lerp(gameObject.GetComponent().velocity, Vector2.zero, Time.deltaTime * speed * speed); - //anim.SetBool("Stay", true); - - - - - } +using UnityEngine; +using System.Collections; + +public class PlayerMovment : MonoBehaviour +{ + public float speed; + Animator anim; + bool presd; + + // Use this for initialization + void Start() + { + //anim = GetComponent(); + //g = GameObject.FindGameObjectWithTag ("GameController").GetComponent (); + } + + // Update is called once per frame + void Update() + { + GetComponent().angularVelocity = 0; + transform.eulerAngles = Vector3.zero; + + //if (Input.anyKey && g.gameState == Globals.GameState.InGame) { + + //anim.SetBool("Stay", false); + + if (Input.GetAxis("Horizontal") < 0) + { + gameObject.GetComponent().AddForce(new Vector2(speed * Input.GetAxis("Horizontal"), 0)); + //anim.SetInteger("Direction", 1); + } + if (Input.GetAxis("Horizontal") > 0) + { + gameObject.GetComponent().AddForce(new Vector2(speed * Input.GetAxis("Horizontal"), 0)); + //anim.SetInteger("Direction", 3); + } + if (Input.GetAxis("Vertical") < 0) + { + gameObject.GetComponent().AddForce(new Vector2(0, speed * Input.GetAxis("Vertical"))); + //anim.SetInteger("Direction", 0); + } + if (Input.GetAxis("Vertical") > 0) + { + gameObject.GetComponent().AddForce(new Vector2(0, speed * Input.GetAxis("Vertical"))); + //anim.SetInteger("Direction", 2); + } + + + + + gameObject.GetComponent().velocity = Vector2.Lerp(gameObject.GetComponent().velocity, Vector2.zero, Time.deltaTime * speed * speed); + //anim.SetBool("Stay", true); + + + + + } } \ No newline at end of file diff --git a/Assets/Player/PlayerMovment.cs.meta b/Assets/CivMarsEngine/Player/PlayerMovment.cs.meta similarity index 100% rename from Assets/Player/PlayerMovment.cs.meta rename to Assets/CivMarsEngine/Player/PlayerMovment.cs.meta diff --git a/Assets/CivMarsEngine/Player/SpaceSuit.cs b/Assets/CivMarsEngine/Player/SpaceSuit.cs new file mode 100644 index 0000000..47c5887 --- /dev/null +++ b/Assets/CivMarsEngine/Player/SpaceSuit.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; + +namespace CivMarsEngine +{ + class SpaceSuit : IGasTank + { + static float[] maxs = { 200f, 200f }; + GasTankCluster tanks = new GasTankCluster(2, maxs); + + public GasTankCluster GetTankCluster() + { + return tanks; + } + } +} \ No newline at end of file diff --git a/Assets/Player/SpaceSuit.cs.meta b/Assets/CivMarsEngine/Player/SpaceSuit.cs.meta similarity index 100% rename from Assets/Player/SpaceSuit.cs.meta rename to Assets/CivMarsEngine/Player/SpaceSuit.cs.meta diff --git a/Assets/ClassDiagram1.cd b/Assets/ClassDiagram1.cd new file mode 100644 index 0000000..20d5523 --- /dev/null +++ b/Assets/ClassDiagram1.cd @@ -0,0 +1,831 @@ + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAA= + Assets\AssetsLoading\AssetsLoader.cs + + + + + + EAAAAAAAAAAgEAAAQAgQQAAAAAAAAAAAAAAAAACAACA= + Assets\AssetsLoading\GameRegystry.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\BasicUtility\TileMap\Tile\Surface\Surface.cs + + + + + + ABQAAEAAACAAAAABEIAAAAAAAAAAQAAAAAAAAAgAEAA= + Assets\Camera\CameraChase.cs + + + + + + AAAAgIAgAAAAgAAACAgAAAAQAAAAAAAAAAAAAAAAAEA= + Assets\CivMarsEngine\Building.cs + + + + + + + EEQACAAAACAAhABAAgAAAAQAICACgEEAUEAEAACACEA= + Assets\CivMars\Buildings\PlanedBuilding.cs + + + + + + + ABAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAEA= + Assets\CivMars\Buildings\Tiled.cs + + + + + + AAAAAAAAAgAAIBIAAAAAAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\BuildingWGUI.cs + + + + + + + AEABAAAAAAAAAAAAAAAAAAAACAABAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Crafting\Recipe.cs + + + + + + RAwAEAQAASgAAAiCACIAIMIEQAABAAAABEAAAAAAAEA= + Assets\CivMarsEngine\GameController.cs + + + + + + AAAAAAAAAAAAIAAEAAgAEQAAAAAIgCAAAgAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasTank.cs + + + + + + AAAAQAAAAAAAAAAgAIAAAAAAgAAAAAgAAAAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasTankCluster.cs + + + + + + ABQAAAAAACAAIBIAACgIAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\GUI\Access Panel\AccesPanel.cs + + + + + + + AIYAAAAIECAQAAAAAgCAAAAAgAIAAAABBAQAgAQQgAA= + Assets\CivMarsEngine\GUI\Access Panel\GasDesplay\GasDesplay.cs + + + + + + AAYAAAAABDAEhAQAAAAAAAAAAAAEgAAAAAAgAARQAAA= + Assets\CivMarsEngine\GUI\Access Panel\GasDesplay\GasDesplayElement.cs + + + + + + AAQAAAAAkCAAEABAAgCAAAAAAAAAQEABAAACAAwAAQA= + Assets\CivMarsEngine\GUI\Access Panel\InventoryDesplay\InventoryDesplay.cs + + + + + + ABQAAABAIAACBQAAAAAAAQAAAAAEgAAAAAAAAAQBgEA= + Assets\CivMarsEngine\GUI\Access Panel\InventoryDesplay\InventoryDrawedElement.cs + + + + + + ABQAAAAAECAAgAAAAAAAAAAAAAAAAAABAAAAAAAAAAg= + Assets\CivMarsEngine\GUI\Access Panel\PlayerStatsDesplay.cs + + + + + + ABQAAAAAACAAIBIBjAACgAAAAAABAAAEAAAAISCAAIA= + Assets\CivMarsEngine\GUI\Buildables\BuildingLister.cs + + + + + + + ACSAAIAEAKAAINCwAAAABAICQAABAAABEAAEEAAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\CraftingDesplay.cs + + + + + + AAQAAAAAAAAAQAAAAAAQAAAAAAEAgAAAAAAAAABAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\CraftingProcess.cs + + + + + + AAAAAAAAAAAABABAAAAABAAAEAAAAAAAAAAEAAAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\QueueItem.cs + + + + + + AAQAAAAAAiAAAABAAAAAAAAAAAAgAAAAAAAAAQAAAAA= + Assets\CivMarsEngine\GUI\Crafting Desplay\RecipeButton.cs + + + + + + + AAQAAAAAACAAEAAAAgAAAAAAAAAAAAABAAACAAgAAQA= + Assets\CivMarsEngine\GUI\Inventory\PlayerInventory.cs + + + + + + ABQAAAAAIAACBAAAAAAAAAAAAAIAgAAAAAAAAAABgEA= + Assets\CivMarsEngine\GUI\Inventory\PlayerInventoryDrawedElement.cs + + + + + + ABCAAAAAACAAAAAAAIAAAAAAAAABAAAAAAAAAAAAEAA= + Assets\CivMarsEngine\GUI\MapListing\NewMap.cs + + + + + + ABQAAAAAAABAAAAAAIgAAAACAAAEAAAQAEAAAAAAAEA= + Assets\CivMarsEngine\GUI\MapListing\SavedMapLister.cs + + + + + + ABQACAAAACAAgAAAAAAAAAAAAAAAAAQAAAAAAAAAAAA= + Assets\CivMarsEngine\GUI\PlayerStats\PlayerStatsSidebarDesplay.cs + + + + + + ABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA= + Assets\CivMarsEngine\InputHandler.cs + + + + + + AAIAAAgAAAAAAABAAIAABAAAAAAIAAACAAAAAAAASAA= + Assets\CivMarsEngine\InventorySystem\Inventory.cs + + + + + + AF4IACAAECAAUCAEAAAAhAAAoACAAQACFCAAAAAASAg= + Assets\CivMarsEngine\Player\Player.cs + + + + + + + AIAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAAAAAAAAA= + Assets\CivMarsEngine\Player\SpaceSuit.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\AssetsLoading\ModAttribute.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\AssetsLoading\ModAttribute.cs + + + + + + AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA= + Assets\BasicUtility\ScreenManagger.cs + + + + + + AAAABAAAAAAAAAAAAAAAAAAAAAAEAAIAAAAAAAAAAAA= + Assets\BasicUtility\ScreenManagger.cs + + + + + + AAAAAAAAAAAAQAQAAAAIAAAAAAQEAAAAQAAAACAAAAA= + Assets\BasicUtility\TileMap\SavedMapData.cs + + + + + + AAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAACAAAAAAAAA= + Assets\BasicUtility\TileMap\SavedTile.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\BasicUtility\TileMap\SavedTile.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAA= + Assets\BasicUtility\TileMap\SavedTile.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAA= + Assets\BasicUtility\TileMap\Tile\Tile.cs + + + + + + ABAABAAABAAQAQMAAAAAAAACAgCAQAACAIABBIAAIkA= + Assets\BasicUtility\TileMap\TileMap.cs + + + + + + AAAAAAAAAAAAAAAAAAgAIAAAAAAAAAIAAAIAAAAAAAA= + Assets\BasicUtility\TileMap\TileTransform.cs + + + + + + AQAAAAIAAAAAAQAAQAEBAAgAAAAAAAAAAQZgAAAQAAA= + Assets\BasicUtility\TileMap\TileVector.cs + + + + + + CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\BasicUtility\TogleGroupAdvanced.cs + + + + + + AAJAAAAAAAAAAAAAAAAABAAAAAAEggAAAAAAAAAAAAA= + Assets\CivMars\Items\Item.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Sapling.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Wood.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Food.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Module.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\OxigenRecoverer.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\RefrinedUranium.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Resource.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Tool.cs + + + + + + AIIIgIAgEAAAgAAAAAAAIgAAAEAAgIAAAAAAAEAACAI= + Assets\CivMars\Ores\OreTile.cs + + + + + + + AAAAAAIACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAgAAAA= + Assets\CivMarsEngine\GUI\GUIHandler.cs + + + + + + ABQAgAAAAyAAIBIAAAAAAAAAAAAAAAAAAAAAAACIAAA= + Assets\CivMarsEngine\GUI\PauseTab.cs + + + + + + + AAAAgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Language.cs + + + + + + QAAQAJAAACAAQAAAAAAAAAEAAAAAAABADAAAAEACAAA= + Assets\CivMarsEngine\Map.cs + + + + + + AAQAAAAAACAgAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAA= + Assets\CivMarsEngine\Player\PlayerMovment.cs + + + + + + AAQAAAAAACACAAIAADCAAAAiAAAAAgAAAAAAAAAAAQA= + Assets\PerlinTest.cs + + + + + + AAIAAKAoCBAAkCAAACAAhAQQghAAAQACBACAAAGASEA= + Assets\CivMars\Buildings\Chest.cs + + + + + + + AAYAYCAgCDAAkGAABCQAhAgShhEAAAAABQCAAACASEA= + Assets\CivMars\Buildings\Furnace.cs + + + + + + + AAYAACAgCCAAkCAAAAAAhAAQwhAAAAAABQDCAAAASAA= + Assets\CivMars\Buildings\GreenHouse.cs + + + + + + + AAIAEKAgABAAkCAAACAChAQAgAAAAQgCFAAAAACASEA= + Assets\CivMars\Buildings\MainBuilding.cs + + + + + + + AA4BoCAgCBAAkCAAACAghAAQghEABAAIRQCAAACASEA= + Assets\CivMars\Buildings\Miner.cs + + + + + + + AAYAYCAgCDAAkGAABCQAhAgShhEAAAAABQCAAACASEA= + Assets\CivMars\Buildings\Press.cs + + + + + + + AQAAACAAAAAAAAAAAAAAAAAgAAAAAAAAAAACAAAAAAA= + Assets\CivMars\CivMarsInit.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\CopperIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\GoldIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\IronIngot.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\Resin.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\BasicMaterials\SiliconRod.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\ControllChip.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\RadioCircuit.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Chips\RadioTransmitterChip.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Circuits\ControlCircuit.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\ElctricalParts\Transistor.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\GlassPLane.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\InteriorPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\IronPipe.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\CoalOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Ore\CopperOre.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Ore\GoldOre.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\IronOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\SandOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\StoneOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA= + Assets\CivMars\Items\Ore\UraniumOre.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\OxygenTank.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Piston.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Plates\IronPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Plates\PlasticPlate.cs + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\Roof.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAACAA= + Assets\CivMars\Items\StoneBrick.cs + + + + + + + AAAAAAAAQAAAAABAAAAAAQAAAAAAAAAAAAAAAAAAAAQ= + Assets\CivMars\NeedToBeImplemented\Old\Generato.cs + + + + + + AAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAA= + Assets\CivMars\NeedToBeImplemented\Old\Oxigeneration.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\CoalOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\IronOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\SandTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\StoneOreTile.cs + + + + + + AIIAAAAAEAAAgAAAAAQAIAAAAAAAAAAAAAAAAEAACAA= + Assets\CivMars\Ores\UraniumOreTile.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAA= + Assets\CivMarsEngine\GasSystem\IGasTank.cs + + + + + + AAAAAAAgCAAAAAAAAAAAAAAQAhAAAAAAAACAAAAAAAA= + Assets\CivMarsEngine\Interfaces\IBuildable.cs + + + + + + AAAAAAAAAAAAAEAAAAQAAAACBAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Interfaces\ICrafter.cs + + + + + + AAAAAAAAAAAAIBIAAAAAAAAAAAAAAAAAAAAAAACAAAA= + Assets\CivMarsEngine\Interfaces\IHasGui.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAA= + Assets\CivMarsEngine\Interfaces\IRegystratabe.cs + + + + + + AAAAgIAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\Interfaces\ISaveble.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA= + Assets\CivMarsEngine\Interfaces\IWorldGen.cs + + + + + + AAIAACAAAAAAECAAAAAAhAAAgAAAAAAABAAAAAAASAA= + Assets\CivMarsEngine\InventorySystem\IInventory.cs + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAIAIAAAAAAAA= + Assets\CivMarsEngine\GasSystem\GasType.cs + + + + + + AAAAABBAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAA= + Assets\CivMarsEngine\GUI\Buildables\BuildingLister.cs + + + + + + AQAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAEAAA= + Assets\BasicUtility\TileMap\TileVector.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAAAAA= + Assets\CivMarsEngine\GameState.cs + + + + \ No newline at end of file diff --git a/Assets/ClassDiagram1.cd.meta b/Assets/ClassDiagram1.cd.meta new file mode 100644 index 0000000..d5b85d9 --- /dev/null +++ b/Assets/ClassDiagram1.cd.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c0c0521138a02ee4da963f6d86c604e5 +timeCreated: 1450798790 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Crafting/ICrafter.cs b/Assets/Crafting/ICrafter.cs deleted file mode 100644 index a9d1b28..0000000 --- a/Assets/Crafting/ICrafter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - - -public interface ICrafter -{ - void AddToQueue(int i); - - void RemoveFromQueue(int i); - - CraftingProcess[] GetQueue(); - - string GetCraftingID(); - -} - diff --git a/Assets/Crafting/Recipe.cs b/Assets/Crafting/Recipe.cs deleted file mode 100644 index 4a79a16..0000000 --- a/Assets/Crafting/Recipe.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public class Recipe -{ - public string buildingID; - public Item[] Materials; - public Item Crafted; - public float time; - - - public Recipe(string ID, Item[] m, Item c, float t) - { - buildingID = ID; - Materials = m; - Crafted = c; - time = t; - } -} - diff --git a/Assets/GUI/Access Panel/AccesPanel.cs b/Assets/GUI/Access Panel/AccesPanel.cs deleted file mode 100644 index 69689d7..0000000 --- a/Assets/GUI/Access Panel/AccesPanel.cs +++ /dev/null @@ -1,67 +0,0 @@ -using UnityEngine; -using System.Collections; -using System; - - -public class AccesPanel : MonoBehaviour, IHasGui -{ - public GameController GameCon; - - public Building OpenBuilding; - - public bool open; - - public GameObject[] AccesTabs; - - public GameObject Graphicks; - - public void Start() - { - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - } - - - public void Update() - { - if (Input.GetButtonUp("Inventory")) - { - Debug.Log("Inventory opening"); - TogelGui(); - } - } - - #region IhasGui - public void TogelGui() - { - if (!open) - { - if (GameCon.AlloweGUI(this as IHasGui)) - { - Open(); - } - } - else - { - GameCon.CloseGUI(this as IHasGui); - Close(); - } - } - - public void Open() - { - open = true; - Graphicks.SetActive(true); - } - - public void Close() - { - open = false; - Graphicks.SetActive(false); - } - - public int ClosingLevel() - { - return 10; - } - #endregion -} diff --git a/Assets/GUI/Access Panel/GasDesplay/GasDesplay.cs b/Assets/GUI/Access Panel/GasDesplay/GasDesplay.cs deleted file mode 100644 index 051f93c..0000000 --- a/Assets/GUI/Access Panel/GasDesplay/GasDesplay.cs +++ /dev/null @@ -1,289 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.UI; - -public class GasDesplay : MonoBehaviour -{ - - - public GameObject GasCanvasPlayer; - public GameObject GasCanvasOther; - - public GameObject TankElement; - public GameObject TankElementBack; - - public GameObject[] drawedInvPlayer = new GameObject[10]; - public GameObject[] drawedInvOther = new GameObject[10]; - - GasTankCluster player; - GasTankCluster other; - - public GasDesplayElement OutPuting; - public GasDesplayElement InPuting; - - void Start() - { - player = GameObject.FindGameObjectWithTag("Player").GetComponent().GetTankCluster(); - } - - - void Update() - { - UpdateDesplay(); - if ((OutPuting != null && InPuting != null) && (OutPuting.tank.gasType == InPuting.tank.gasType || InPuting.tank.gasType == GasType.Null)) - { - OutPuting.tank.Transfer(InPuting.tank, 5f * Time.deltaTime); - } - } - - public void UpdateData(Building datas) - { - if (datas is IGasTank) - { - other = ((IGasTank)datas).GetTankCluster(); - } - } - - public void UpdateDesplay() - { - if (other == null) - { - UpdateDesplaySection(player, drawedInvPlayer, GasCanvasPlayer.gameObject, true); - - foreach (GameObject item in drawedInvOther) - { - Destroy(item); - } - } - else - { - UpdateDesplaySection(player, other, drawedInvPlayer, GasCanvasPlayer.gameObject, true); - UpdateDesplaySection(other, player, drawedInvOther, GasCanvasOther.gameObject, false); - } - } - - void UpdateDesplaySection(GasTankCluster TankThis, GasTankCluster TankOthe, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) - { - for (int i = 0; i < TankThis.size; i++) - { - GameObject actual = drawed[i]; - - //van itt item - - //Van kint valami - if (actual != null) - { - //Background element - if (actual.GetComponent() == null) - { - //Destroy back - Destroy(actual); - actual = null; - - //Create item - actual = null; - actual = Instantiate(TankElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - - actual.GetComponent().Set(TankThis.GetTank(i), this); - } - } - else - { - //create item - actual = null; - actual = Instantiate(TankElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - - actual.GetComponent().Set(TankThis.GetTank(i), this); - } - - - drawed[i] = actual; - } - } - - void UpdateDesplaySection(GasTankCluster TankThis, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) - { - for (int i = 0; i < TankThis.size; i++) - { - GameObject actual = drawed[i]; - - //van itt item - if (TankThis.GetTank(i).gasType != GasType.Null) - { - //Van kint valami - if (actual != null) - { - //Background element - if (actual.GetComponent() == null) - { - //Destroy back - Destroy(actual); - actual = null; - - //Create item - actual = null; - actual = Instantiate(TankElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - - actual.GetComponent().Set(TankThis.GetTank(i), this); - - - } - //Item element - else if (actual.GetComponent() != null) - { - //update item - drawed[i].GetComponent().Set(TankThis.GetTank(i), this); - } - } - else - { - //create item - actual = null; - actual = Instantiate(TankElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - Debug.Log(TankThis.GetTank(i).ToString()); - - actual.GetComponent().Set(TankThis.GetTank(i), this); - } - } - //nics item - else - { - //Van kint valami - if (actual != null) - { - // background - if (actual.GetComponent() == null) - { - //OK - } - // Item element - else if (actual.GetComponent() != null) - { - //Destroy older - Destroy(actual); - actual = null; - - //Create Back - actual = null; - actual = Instantiate(TankElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - else - { - //Create Back - actual = null; - actual = Instantiate(TankElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - drawed[i] = actual; - } - } - - - public void SetOtherInv(IGasTank OtherInventory) - { - - if (OtherInventory != null) - { - other = OtherInventory.GetTankCluster(); - foreach (GameObject des in drawedInvOther) - { - Destroy(des); - } - drawedInvOther = new GameObject[other.size]; - } - else - { - foreach (GameObject des in drawedInvOther) - { - Destroy(des); - } - } - } - - public bool SetInput(GasDesplayElement t) - { - if (InPuting != null && InPuting != t) - { - InPuting.SetInput(false); - } - if (t != null) - { - if (OutPuting != null) - { - //if (OutPuting.tank.gasType == t.tank.gasType || t.tank.gasType == GasType.Null) - //{ - InPuting = t; - return true; - //} - //else - //{ - //return false; - //} - } - else - { - InPuting = t; - return true; - } - } - else - { - InPuting = null; - return true; - } - - } - - public bool SetOutput(GasDesplayElement t) - { - if (OutPuting != null && OutPuting != t) - { - OutPuting.SetOutput(false); - } - if (t != null) - { - if (InPuting != null) - { - //if (InPuting.tank.gasType == t.tank.gasType || t.tank.gasType == GasType.Null) - //{ - OutPuting = t; - return true; - //} - //else - //{ - //return false; - //} - } - else - { - OutPuting = t; - return true; - } - } - else - { - OutPuting = null; - return true; - } - } - -} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/GasDesplay/GasDesplayElement.cs b/Assets/GUI/Access Panel/GasDesplay/GasDesplayElement.cs deleted file mode 100644 index f2f091d..0000000 --- a/Assets/GUI/Access Panel/GasDesplay/GasDesplayElement.cs +++ /dev/null @@ -1,150 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.UI; - -public class GasDesplayElement : MonoBehaviour { - - public Text gasName; - public Text amount; - public Slider amountSlider; - - public Toggle inButton; - public Toggle outButton; - - public bool inPressed; - public bool outPressed; - - public GasTank tank; - GasDesplay other; - - // Use this for initialization - void Start () { - - } - - // Update is called once per frame - void Update () { - if (tank != null) - { - if (tank.gasType != GasType.Null) - { - gasName.text = tank.gasType.ToString(); - } - else - { - gasName.text = "Nothing"; - } - amount.text = tank.amount + " / " + tank.maxAmount; - amountSlider.value = tank.amount / tank.maxAmount; - - inButton.gameObject.SetActive(true); - outButton.gameObject.SetActive(true); - } - else - { - //inButton.gameObject.SetActive(false); - //outButton.gameObject.SetActive(false); - } - - ChangedState(); - } - - public void Set(GasTank thisTnak, GasDesplay otherD) - { - other = otherD; - - if (thisTnak != null) - { - tank = thisTnak; - } - else - { - tank = null; - } - } - - public void Set(GasTank thisTnak) - { - if (thisTnak != null) - { - tank = thisTnak; - } - else - { - tank = null; - } - } - - public void ChangedState() - { - if (inButton.isOn != inPressed ) - { - if (inButton.isOn) - { - if (!(other.SetInput(this))) - { - inButton.isOn = false; - } - - if (outPressed) - { - other.SetOutput(null); - } - } - else - { - other.SetInput(null); - } - inPressed = inButton.isOn; - outPressed = outButton.isOn; - } - if(outButton.isOn != outPressed) - { - if (outButton.isOn) - { - if (!(other.SetOutput(this))) - { - outButton.isOn = false; - } - - if (inPressed) - { - other.SetInput(null); - } - } - else - { - other.SetOutput(null); - } - inPressed = inButton.isOn; - outPressed = outButton.isOn; - } - /* - if(!h) - { - if (outPressed) - { - other.SetOutput(null); - } - if (inPressed) - { - other.SetInput(null); - } - inPressed = inButton.isOn; - outPressed = outButton.isOn; - } - */ - } - - public void SetInput(bool a) - { - inPressed = a; - inButton.isOn = a; - } - - public void SetOutput(bool a) - { - outPressed = a; - outButton.isOn = a; - } -} diff --git a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs b/Assets/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs deleted file mode 100644 index f77cc82..0000000 --- a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDesplay.cs +++ /dev/null @@ -1,281 +0,0 @@ -using UnityEngine; -using System.Collections; -using System; - -public class InventoryDesplay : MonoBehaviour -{ - public GameObject InventoryCanvasPlayer; - public GameObject InventoryCanvasOther; - - public GameObject InventoryDubleElement; - public GameObject InventoryElementBack; - - GameObject[] drawedInvPlayer = new GameObject[10]; - GameObject[] drawedInvOther = new GameObject[10]; - - IInventory player; - IInventory other; - - void Start() - { - player = GameObject.FindGameObjectWithTag("Player").GetComponent(); - } - - void Update() - { - UpdateInventory(); - } - - public void UpdateInventory() - { - UpdateInventorySection(player, other, drawedInvPlayer, InventoryCanvasPlayer, true); - - UpdateInventorySection(other, player, drawedInvOther, InventoryCanvasOther, false); - } - - void UpdateInventorySection(IInventory invThis, IInventory invOthe, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) - { - for (int i = 0; i < invThis.GetInventorySize(); i++) - { - GameObject actual = drawed[i]; - - //van itt item - if (invThis.GetStackInSlot(i) != null) - { - //Van kint valami - if (actual != null) - { - //Background element - if (actual.GetComponent() == null) - { - //Destroy back - Destroy(actual); - actual = null; - - //Create item - actual = Instantiate(InventoryDubleElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, invOthe, invThis, i); - } - //Item element - else - { - //update item - drawed[i].GetComponent().Set(invThis.GetStackInSlot(i).amount); - drawed[i].GetComponent().other = invOthe; - drawed[i].GetComponent().thisinv = invThis; - } - } - else - { - //create item - actual = null; - actual = Instantiate(InventoryDubleElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, invOthe, invThis, i); - drawed[i] = actual; - } - } - //nics item - else - { - //Van kint valami - if (actual != null) - { - // background - if (actual.GetComponent() != null) - { - //Destroy older - Destroy(actual); - actual = null; - - //Create Back - actual = null; - actual = Instantiate(InventoryElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - else - { - //Create Back - actual = null; - actual = Instantiate(InventoryElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - drawed[i] = actual; - } - - int a = invThis.GetInventorySize() / 3; - if (invThis.GetInventorySize() % 3 > 0) - { - a++; - } - drawingCanvas.GetComponent().sizeDelta = new Vector2(0, (a * (50)) + 10); - } - - /* - void UpdateInventorySection(IInventory invThis, GameObject[] drawed, GameObject drawingCanvas, bool isplayer) - { - for (int i = 0; i < invThis.GetInventorySize(); i++) - { - - - GameObject actual = drawed[i]; - - //van itt item - if (invThis.GetStackInSlot(i) != null) - { - //Van kint valami - if (actual != null) - { - //Background element - if (actual.GetComponent() == null) - { - //Destroy back - Destroy(actual); - actual = null; - - //Create item - actual = null; - actual = Instantiate(InventoryDubleElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - - actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, null, invThis, i); - - - } - //Item element - else if (actual.GetComponent() != null) - { - //update item - drawed[i].GetComponent().Set(invThis.GetStackInSlot(i).amount); - drawed[i].GetComponent().other = null; - drawed[i].GetComponent().thisinv = invThis; - - } - } - else - { - //create item - actual = null; - actual = Instantiate(InventoryDubleElement); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - - - actual.GetComponent().Set(invThis.GetStackInSlot(i), isplayer, null, invThis, i); - } - } - //nics item - else - { - //Van kint valami - if (actual != null) - { - // background - if (actual.GetComponent() == null) - { - //OK - } - // Item element - else if (actual.GetComponent() != null) - { - //Destroy older - Destroy(actual); - actual = null; - - //Create Back - actual = null; - actual = Instantiate(InventoryElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - else - { - //Create Back - actual = null; - actual = Instantiate(InventoryElementBack); - actual.transform.SetParent(drawingCanvas.transform); - actual.transform.SetSiblingIndex(i); - } - } - drawed[i] = actual; - } - } - */ - - public void Activate(IInventory OtherInventory) - { - if (OtherInventory != null) - { - other = OtherInventory; - - drawedInvOther = new GameObject[other.GetInventorySize()]; - - gameObject.SetActive(true); - } - } - - public void Deactive() - { - other = null; - - foreach (GameObject des in drawedInvOther) - { - Destroy(des); - } - - gameObject.SetActive(false); - - } - -/* - public void SetOtherInv(IInventory OtherInventory) - { - other = OtherInventory; - if (OtherInventory != null) - { - foreach (GameObject des in drawedInvOther) - { - Destroy(des); - } - - drawedInvOther = new GameObject[other.GetInventorySize()]; - } - else - { - foreach (GameObject des in drawedInvOther) - { - Destroy(des); - } - } - } -*/ - - public void UpdateData() - { - throw new NotImplementedException(); - } - - public void UpdateData(Building datas) - { - if (datas is IInventory) - { - Activate(((IInventory)datas)); - } - else - { - Deactive(); - } - } -} diff --git a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs b/Assets/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs deleted file mode 100644 index 6b4e4cd..0000000 --- a/Assets/GUI/Access Panel/InventoryDesplay/InventoryDrawedElement.cs +++ /dev/null @@ -1,95 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.UI; - -[AddComponentMenu("Inventory/Inventory Element")] -public class InventoryDrawedElement : MonoBehaviour -{ - GameController GameCon; - - public bool isPlayer; - public string drawname_name; - public int amount; - public int index; - - public IInventory other; - public IInventory thisinv; - - - public GameObject nameDisplay; - public GameObject amountDisplay; - public Button button; - - - // Use this for initialization - void Awake() - { - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - } - - // Update is called once per frame - void Update() - { - if (other == null) - { - button.gameObject.SetActive(false); - } - else - { - button.gameObject.SetActive(true); - } - } - - - #region Set - public void Set(int setAmount) - { - this.amount = setAmount; - amountDisplay.GetComponent().text = null; - amountDisplay.GetComponent().text = setAmount.ToString(); - - //Debug.Log("updated drawed inv element: amount: " + amount + " type: " + this.name + " obj: " + this.GetType().ToString()); - } - - public void Set(string setName) - { - this.drawname_name = setName; - //Debug.Log(setName); - - nameDisplay.GetComponent().text = setName.ToString(); - } - - public void Set(string setName, int setAmount) - { - Set(setName); - Set(setAmount); - } - - public void Set(Item item, bool isp, IInventory o, IInventory t, int i) - { - isPlayer = isp; - other = o; - thisinv = t; - index = i; - - - Set(item.amount); - Set(Language.Get(item, GameCon.language)); - } - #endregion - - - public void Transfer() - { - Debug.Log("Transfer"); - if (Input.GetButton("Specific")) - { - thisinv.TransferItemAmount(other, index, 1); - return; - } - - - thisinv.TransferItem(other, index); - - } -} \ No newline at end of file diff --git a/Assets/GUI/Access Panel/PlayerStatsDesplay.cs b/Assets/GUI/Access Panel/PlayerStatsDesplay.cs deleted file mode 100644 index 60cd483..0000000 --- a/Assets/GUI/Access Panel/PlayerStatsDesplay.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; -using UnityEngine.UI; - -class PlayerStatsTabDesplay : MonoBehaviour -{ - GameController GameCon; - Player player; - - public Text health; - public Text hearthRate; - - void Start() - { - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - player = GameCon.playerclass; - } - - void Update() - { - health.text = player.health.ToString(); - hearthRate.text = "60 rp"; - } - - public void UpdateData(Building datas) - { - //throw new NotImplementedException(); - } -} - diff --git a/Assets/GUI/ActionButton.cs b/Assets/GUI/ActionButton.cs deleted file mode 100644 index 26ceb81..0000000 --- a/Assets/GUI/ActionButton.cs +++ /dev/null @@ -1,93 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Reflection; -using UnityEngine.UI; - -public class ActionButton : MonoBehaviour -{ - - - public float countdown; - public float fullcount; - - public GameController GameCon; - - GameObject playergo; - - public Button buttonscript; - - - public float defaultYPos; - public float defaultXPos; - - public RectTransform maskRect; - public string action = "Mine"; - - - public bool ActionRuned = true; - - // Use this for initialization - void Start() - { - ActionRuned = true; - - GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - - countdown = 0; - - buttonscript = gameObject.GetComponent