From de00270f0d08b38c6168566b9813b0c2801762ad Mon Sep 17 00:00:00 2001 From: dpeter99 Date: Mon, 3 Aug 2015 09:49:38 +0200 Subject: [PATCH] Manual blanch merging --- Assets/GameController.cs | 54 ++++- Assets/Main.unity | Bin 14220 -> 0 bytes Assets/Map.cs | 4 +- Assets/MapLoad.cs | 15 +- Assets/Ore.cs | 79 ------ Assets/{scripts => Player}/Player.cs.meta | 0 Assets/{ => Player}/PlayerMovment.cs | 0 Assets/{ => Player}/PlayerMovment.cs.meta | 0 Assets/Resources/Texturas/1.png.meta | 4 +- Assets/SandOre.cs | 8 + Assets/{ => Scenes}/Main.unity.meta | 0 Assets/{ => Scenes}/Start.unity | Bin 31202 -> 32354 bytes Assets/{ => Scenes}/Start.unity.meta | 0 Assets/TerrainGen.cs | 11 +- Assets/Tile/OreTile.cs | 99 ++++++++ Assets/{Ore.cs.meta => Tile/OreTile.cs.meta} | 0 Assets/{ => Tile}/OreType.cs | 0 Assets/{ => Tile}/OreType.cs.meta | 0 Assets/{ => Tile}/Tile.cs | 6 - Assets/{ => Tile}/Tile.cs.meta | 0 Assets/Tiles.cd | 4 +- Assets/scripts/Assembler.cs | 5 +- Assets/scripts/Building.cs | 10 +- Assets/scripts/Class1.cs | 6 +- Assets/scripts/Food.cs | 5 +- Assets/scripts/Furnace.cs | 5 +- Assets/scripts/Generato.cs | 11 +- Assets/scripts/GlassPLane.cs | 8 +- Assets/scripts/IInventory.cs | 3 - Assets/scripts/InteriorPlate.cs | 6 +- Assets/scripts/Iron.cs | 9 +- Assets/scripts/IronIngot.cs | 6 +- Assets/scripts/IronPipe.cs | 6 +- Assets/scripts/IronPlate.cs | 6 +- Assets/scripts/Item.cs | 8 +- .../{MainDiagram.cd.meta => ItemsDia.cd.meta} | 4 +- Assets/scripts/MainDiagram.cd | 228 ------------------ Assets/scripts/Miner.cs | 6 +- Assets/scripts/NuclearReactor.cs | 6 +- Assets/scripts/Ore.cs | 6 +- Assets/scripts/OreType.cs | 8 +- Assets/scripts/Oxigeneration.cs | 6 +- Assets/scripts/Player.cs | 29 --- Assets/scripts/Producer.cs | 10 +- Assets/scripts/RefrinedUranium.cs | 8 +- Assets/scripts/ResearchFacility.cs | 6 +- Assets/scripts/Resource.cs | 6 +- Assets/scripts/Roof.cs | 6 +- Assets/scripts/SpecMine.cs | 6 +- Assets/scripts/Stone.cs | 10 +- Assets/scripts/StoneBrick.cs | 6 +- Assets/scripts/Tool.cs | 6 +- Assets/scripts/UniverzalMiner.cs | 6 +- Assets/scripts/Uranium.cs | 10 +- Assets/scripts/UraniumRefiner.cs | 6 +- Assets/scripts/WareHouse.cs | 6 +- Assets/scripts/Wood.cs | 6 +- Assets/scripts/coal.cs | 9 +- 58 files changed, 298 insertions(+), 480 deletions(-) delete mode 100644 Assets/Main.unity delete mode 100644 Assets/Ore.cs rename Assets/{scripts => Player}/Player.cs.meta (100%) rename Assets/{ => Player}/PlayerMovment.cs (100%) rename Assets/{ => Player}/PlayerMovment.cs.meta (100%) create mode 100644 Assets/SandOre.cs rename Assets/{ => Scenes}/Main.unity.meta (100%) rename Assets/{ => Scenes}/Start.unity (83%) rename Assets/{ => Scenes}/Start.unity.meta (100%) create mode 100644 Assets/Tile/OreTile.cs rename Assets/{Ore.cs.meta => Tile/OreTile.cs.meta} (100%) rename Assets/{ => Tile}/OreType.cs (100%) rename Assets/{ => Tile}/OreType.cs.meta (100%) rename Assets/{ => Tile}/Tile.cs (53%) rename Assets/{ => Tile}/Tile.cs.meta (100%) rename Assets/scripts/{MainDiagram.cd.meta => ItemsDia.cd.meta} (64%) delete mode 100644 Assets/scripts/MainDiagram.cd delete mode 100644 Assets/scripts/Player.cs diff --git a/Assets/GameController.cs b/Assets/GameController.cs index ccc5387..a7c2f6a 100644 --- a/Assets/GameController.cs +++ b/Assets/GameController.cs @@ -6,40 +6,56 @@ public class GameController : MonoBehaviour { public Map map; + public Player playerclass; + //map Load public Sprite[] sprites; public GameObject mapPiece; public float tileSize; public Vector2 posMultiplyer; - + //Ore gen public float orePercent; public float oreReducer; + //UI + public GUIHandler guiHandler; + //Base GUI public GameObject load; public GameObject menu; public Text bar; public float loadProgress; - public bool MapLoaded = false; + public bool gameIsOn = false; void Awake() { DontDestroyOnLoad(transform.gameObject); } + void OnLevelWasLoaded(int level) + { + if (level == 1) + { + guiHandler = GameObject.Find("_GUIHandler").GetComponent(); + playerclass = GameObject.FindGameObjectWithTag("Player").GetComponent(); + } + + } public void Update() { - if (Application.loadedLevelName == "Main" && !MapLoaded) + if (Application.loadedLevelName == "Main" && !gameIsOn) { Debug.Log("Jeej!"); sprites = Resources.LoadAll("Texturas"); - Tile[,] t = TerrainGen.Generate(orePercent, oreReducer, 1245); + Tile[,] t = TerrainGen.Generate(orePercent, oreReducer, 666421, 2); + + map = new Map(t); Debug.Log(t.Length == null); @@ -47,11 +63,12 @@ public void Update() MapLoad.MapDraw(map, mapPiece, sprites, tileSize); - MapLoaded = true; + gameIsOn = true; + + Camera.main.GetComponent().MapLoaded(); } } - public void StartGame() { @@ -72,8 +89,8 @@ public IEnumerator LoadLevel(string a) //while (!async.isDone) //{ - loadProgress = async.progress * 100; - bar.text = loadProgress + "!!"; + loadProgress = async.progress * 100; + bar.text = loadProgress + "!!"; yield return async; //} @@ -82,5 +99,26 @@ public IEnumerator LoadLevel(string a) } + public void TogleInventory() + { + if (!(guiHandler.inventoryOn)) + { + Debug.Log("Opening"); + guiHandler.actionGroup.SetActive(false); + guiHandler.InventoryDisplay.gameObject.SetActive(true); + playerclass.gameObject.GetComponent().isKinematic = true; + guiHandler.inventoryOn = true; + return; + } + else + { + Debug.Log("Closing"); + guiHandler.actionGroup.SetActive(true); + guiHandler.InventoryDisplay.gameObject.SetActive(false); + playerclass.gameObject.GetComponent().isKinematic = false; + guiHandler.inventoryOn = false; + return; + } + } } diff --git a/Assets/Main.unity b/Assets/Main.unity deleted file mode 100644 index 1642cf860ee015f91af93f199361805e19e418e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal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aOn&ug=OFsuoTjs-xn1kD9pn z%4i?QphlPqnL$)VaQTF~GK@Ji1pCPs*cvwc?C@C=b_gag0BI zQ4yj}IrU;d_{#y*$*C6uipS;Divi*~pZ8e4axsumoO}2Kz}c@{3lH)Oy*{|EH zsc)or{VoyO$^FX3faNm*diOy(Em*BC&k6hf(kA@77N<*2Wt5(Leuz5dTrTYm{B4V` zh~fMgeFZY*r@ZRslJfInARe>0_0@|3<jQOMFRt<+qRy^HHkq{0Pe7g$aLPk@AxRxCTYPO3K5FrG zO?YVW^%fr-4T}*%4Sowghnr}`6<#G8EO`0gh#qKjK7Rbx0Nk0Jjf2&piXU|&Hq+BD zt_tw|q0NhO1^(Iw6uT=LI`xOaP}2cfAPocXm5%M%a;|`n>)^|u@pPA600E>Q5s4oj z_IK}LzugS<5D`V&yHU$lqhR-*WSCUP@X-XHXrs5JS7W-{wynfq{sMLGs4rTc_t>`Q(AM1Fy|(Qd2$8`%8zk!(7OvXR zj;a|$8-t*@Ebp~#D=`VQxSf*qy+yX|Cfjxg+U~HjEVgZ*ux)$Mw%4{@V%wfZ+x@_~ z6D+iCm)f>2Y`2Lqs8FE98jU|LPg&1nUw!HR=gJ5Bo>*4+!QwB?{=R_H%s+0^W4Tlu z3cYZAZMBRGxO85xp3=~JeA=LSnFk(P{l>iF;%$FWd3E*+ecOK{$%-uE=~%{?TB|Y7 zw#8ADw>ENZD|yU&Y58WQd9eMyMK`xT5f)lM_wYS}n=d=szTi_Ax0_pUZ)d%clay1FiC{emTY~L6NAq`ALA%w?oq3bh7Bv;f?2i13Z0aKmY&$ diff --git a/Assets/Map.cs b/Assets/Map.cs index b8df7d8..16cb1fa 100644 --- a/Assets/Map.cs +++ b/Assets/Map.cs @@ -11,9 +11,9 @@ public class Map public Map(Tile[,] inmap) { - mapHeight = (int)Math.Sqrt(inmap.Length); + this.mapHeight = (int)Math.Sqrt(inmap.Length); - mapArray = new Tile[mapHeight, mapHeight, 2]; + this.mapArray = new Tile[mapHeight, mapHeight, 2]; for (int i = 0; i < mapHeight; i++) { diff --git a/Assets/MapLoad.cs b/Assets/MapLoad.cs index 9bf7bf5..570cda8 100644 --- a/Assets/MapLoad.cs +++ b/Assets/MapLoad.cs @@ -40,8 +40,8 @@ public static void MapDraw(Map map, GameObject mapPiece, Sprite[] sprites, float //Debug.Log(xPos + "," + yPos); - GameObject go = GameObject.Instantiate(mapPiece); - + GameObject go = GameObject.Instantiate(mapPiece); + go.name = "Tile_" + xPos + "_" + yPos; SpriteRenderer curr = go.GetComponent(); curr.sprite = sprites[((int)map.mapArray[xPos, yPos, 0].type)]; @@ -58,4 +58,15 @@ public static void MapDraw(Map map, GameObject mapPiece, Sprite[] sprites, float } } + + public static void MapUpdate(int x, int y, Map map) + { + Sprite[] sprites = Resources.LoadAll("Texturas"); + + GameObject go = GameObject.Find("Tile_" + x + "_" + y); + SpriteRenderer curr = go.GetComponent(); + + curr.sprite = sprites[((int)map.mapArray[x, y, 0].type)]; + + } } diff --git a/Assets/Ore.cs b/Assets/Ore.cs deleted file mode 100644 index b85cec8..0000000 --- a/Assets/Ore.cs +++ /dev/null @@ -1,79 +0,0 @@ - -public class Ore : Tile -{ - public Tile[,] Spread(Tile[,] map, float h, System.Random rnd, float reduce) - { - int l = (int)System.Math.Sqrt(map.Length); - - if (x != l - 1) - { - if ((int)map[x + 1, y].type < (int)base.type) - { - if (rnd.Next(0, 100) >= h) - { - map[x + 1, y] = null; - map[x + 1, y] = new Ore(base.type, x + 1, y); - - map = ((Ore)map[x + 1, y]).Spread(map, h + reduce, rnd, reduce); - } - } - } - if (x != 0) - { - if ((int)map[x - 1, y].type < (int)base.type) - { - if (rnd.Next(0, 100) >= h) - { - map[x - 1, y] = null; - map[x - 1, y] = new Ore(base.type, x - 1, y); - - map = ((Ore)map[x - 1, y]).Spread(map, h + reduce, rnd, reduce); - } - } - } - if (y != l - 1) - { - if ((int)map[x, y + 1].type < (int)base.type) - { - if (rnd.Next(0, 100) >= h) - { - map[x, y + 1] = null; - map[x, y + 1] = new Ore(base.type, x, y + 1); - - map = ((Ore)map[x, y + 1]).Spread(map, h + reduce, rnd, reduce); - } - } - } - if (y != 0) - { - if ((int)map[x, y - 1].type < (int)base.type) - { - if (rnd.Next(0, 100) >= h) - { - map[x, y - 1] = null; - map[x, y - 1] = new Ore(base.type, x, y - 1); - - map = ((Ore)map[x, y - 1]).Spread(map, h + reduce, rnd, reduce); - } - } - } - - return map; - } - - - public Ore(OreType gettype, int xpos, int ypos) - : base(gettype, xpos, ypos) - { - - - } - - public Ore(System.Random rnk, int xpos, int ypos) - : base(xpos, ypos) - { - this.type = (OreType)rnk.Next(1, 6); - - - } -} diff --git a/Assets/scripts/Player.cs.meta b/Assets/Player/Player.cs.meta similarity index 100% rename from Assets/scripts/Player.cs.meta rename to Assets/Player/Player.cs.meta diff --git a/Assets/PlayerMovment.cs b/Assets/Player/PlayerMovment.cs similarity index 100% rename from Assets/PlayerMovment.cs rename to Assets/Player/PlayerMovment.cs diff --git a/Assets/PlayerMovment.cs.meta b/Assets/Player/PlayerMovment.cs.meta similarity index 100% rename from Assets/PlayerMovment.cs.meta rename to Assets/Player/PlayerMovment.cs.meta diff --git a/Assets/Resources/Texturas/1.png.meta b/Assets/Resources/Texturas/1.png.meta index 801820d..4384467 100644 --- a/Assets/Resources/Texturas/1.png.meta +++ b/Assets/Resources/Texturas/1.png.meta @@ -30,7 +30,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: filterMode: -1 - aniso: -1 + aniso: 16 mipBias: -1 wrapMode: 1 nPOTScale: 0 @@ -43,7 +43,7 @@ TextureImporter: alignment: 0 spritePivot: {x: .5, y: .5} spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 + spritePixelsToUnits: 16 alphaIsTransparency: 1 textureType: 8 buildTargetSettings: [] diff --git a/Assets/SandOre.cs b/Assets/SandOre.cs new file mode 100644 index 0000000..7df3270 --- /dev/null +++ b/Assets/SandOre.cs @@ -0,0 +1,8 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +public class SandOre : Ore +{ +} diff --git a/Assets/Main.unity.meta b/Assets/Scenes/Main.unity.meta similarity index 100% rename from Assets/Main.unity.meta rename to Assets/Scenes/Main.unity.meta diff --git a/Assets/Start.unity b/Assets/Scenes/Start.unity similarity index 83% rename from Assets/Start.unity rename to Assets/Scenes/Start.unity index 1808dcc589a752dd7439141b088e0985d7cbca8a..b04898c78d8b46b537b0405957307f695ede7935 100644 GIT binary patch delta 1959 zcmZWqZA_C_6u!58TUsdJY(XK@l^;vQ zxjDMa9L8ZVArq5D>>3xAXw=2AOtWmVY-YMClFYczWO1S>&^`C|EwXZx``+_B&$;J4 z=ibw|Q@7~UEX^Ur@fRU)))7Kt330|@CB^xs{K7^PnGXa4G!?|OFK4?%@AwC$A|<`+ zpNP1sqBDM9^adrp=U2yHljwc_jij#?bk=`7^|D0g{ChJju`Brgu7mIXF-j%pkM``T zKb<4f!@4hw=T{H?y|!n5gJFcn9$UFSTr~31;WHloF zvk-e#SnRCmAC#o$S+G2oo>d!DEDr+_4Iz{$$yGvn^ze{CWh~;?!ES=a^IW#TOTs@H znENkhK4VIn0Tva}D5-^wU81^2M0KT6k?e9oj3;xE*I~qU1M?VJn892q`5Afa3__AE zcmr}&5bpmrF!#q*!v6vPj?6!{z*FJBPv&z4PaZ{}pm0DIRs;pX55xY9%@mZWcmZeG zGp4d=ZjEE|11R97P!qdYkdjsi94hw$>`SuGO5sz)eO47O^5Mx}0p`i`%Lx@bgko<3 zQp^(0TiB>FFU@N0a6O%6ZMJpuK4=$feY4H&W|vI$=|Q!;#!_KxZ4jNZrPC>FR#KR! z*@CvQxT{+IO@(`&p!xoPH$6u^Uil>y9l+o7(c`xt;;R)IeS($ug^LpygR(|cgfsy2 zq$PRZAz5=kvx4V+?-J<~qBzi41d5D73ws|sxLNz8RgJn8gv^OO5!{tX@}64sPA~AR z(BOojlC??p%Vs^*Fq18j>1>*phO~t2g3b>uRL^^RGoIpm43UHkV4V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7U1avT5ZVTL=Ic4lb54De>a}MNw7aFv&ubo)c+VD z1>|2*pVsG+*^S;rRmS{Oy|&{Zv=9RD++bFc_sW9RfHVs24b1~?^Z9S&%)i^KwquymJ`dNxsIhnXDgE>pPRH!=Ugf z6TOwYvO2Y{J<(f}T7Q|A+?HCe+@0BxT05PY2YBs}tDC(t-fYSxEw2mRywnoW<)5vF z9DOk$J#mlxt!=Gzw-~Z39ukJU6kjTD$NS~&mo5m+?A?>52~D2b8xan3Xm5nU#C`^) zZ3P10@%Huj?P-4%&N&@lGxf`Xh|tZPgJ=H(W1SZnSdl|7UuDp9cnf~NKiu;#x|e9H diff --git a/Assets/Start.unity.meta b/Assets/Scenes/Start.unity.meta similarity index 100% rename from Assets/Start.unity.meta rename to Assets/Scenes/Start.unity.meta diff --git a/Assets/TerrainGen.cs b/Assets/TerrainGen.cs index b97ec71..fbdc0cd 100644 --- a/Assets/TerrainGen.cs +++ b/Assets/TerrainGen.cs @@ -6,15 +6,16 @@ public class TerrainGen{ - public static Tile[,] Generate(float h, float reduce , int seed) + public static Tile[,] Generate(float h, float reduce , int seed,int maxOre) { FileStream file = new FileStream("./file.txt", FileMode.Create); StreamWriter wf = new StreamWriter(file); + int gen = 50; float[,] h2 = new float[,] { {3f, 15f}, {2f,20f}, {1f,22f}, {0.2f,30f}, {0.1f,40f}, {0.001f,45}}; - System.Random rand = new System.Random(5000); + System.Random rand = new System.Random(seed); Tile[,] map = new Tile[50, 50]; Tile initial; @@ -26,7 +27,7 @@ public class TerrainGen{ { for (int j = 0; j < gen; j++) { - map[i, j] = new Tile(OreType.Surface, i, j); + map[i, j] = new Tile(i, j); } } @@ -34,14 +35,14 @@ public class TerrainGen{ { for (int j = 0; j < gen; j++) { - initial = new Ore(rand, i, j); + initial = new OreTile(rand, i, j, maxOre); h = h2[(int)initial.type,0]; reduce = h2[(int)initial.type, 1]; if (rand.Next(0, 100) <= h && !t) { map[i, j] = initial; - map = ((Ore)map[i, j]).Spread(map, h, rand, reduce); + map = ((OreTile)map[i, j]).Spread(map, h, rand, reduce, rand.Next(1,maxOre)); t = false; } diff --git a/Assets/Tile/OreTile.cs b/Assets/Tile/OreTile.cs new file mode 100644 index 0000000..95664e5 --- /dev/null +++ b/Assets/Tile/OreTile.cs @@ -0,0 +1,99 @@ + +public class OreTile : Tile +{ + public float amount; + public float[] miningTime = {0,4,4.5f,5,7,14,3,3}; + + public Tile[,] Spread(Tile[,] map, float h, System.Random rnd, float reduce, float amountReduce) + { + int l = (int)System.Math.Sqrt(map.Length); + + float amountnext = amount; + + if (x != l - 1) + { + if ((int)map[x + 1, y].type < (int)base.type) + { + if (rnd.Next(0, 100) >= h) + { + map[x + 1, y] = null; + map[x + 1, y] = new OreTile(base.type, x + 1, y, amountnext); + + map = ((OreTile)map[x + 1, y]).Spread(map, h + reduce, rnd, reduce,amountReduce); + } + } + } + if (x != 0) + { + if ((int)map[x - 1, y].type < (int)base.type) + { + if (rnd.Next(0, 100) >= h) + { + map[x - 1, y] = null; + map[x - 1, y] = new OreTile(base.type, x - 1, y, amountnext); + + map = ((OreTile)map[x - 1, y]).Spread(map, h + reduce, rnd, reduce, amountReduce); + } + } + } + if (y != l - 1) + { + if ((int)map[x, y + 1].type < (int)base.type) + { + if (rnd.Next(0, 100) >= h) + { + map[x, y + 1] = null; + map[x, y + 1] = new OreTile(base.type, x, y + 1, amountnext); + + map = ((OreTile)map[x, y + 1]).Spread(map, h + reduce, rnd, reduce, amountReduce); + } + } + } + if (y != 0) + { + if ((int)map[x, y - 1].type < (int)base.type) + { + if (rnd.Next(0, 100) >= h) + { + map[x, y - 1] = null; + map[x, y - 1] = new OreTile(base.type, x, y - 1, amountnext); + + map = ((OreTile)map[x, y - 1]).Spread(map, h + reduce, rnd, reduce, amountReduce); + } + } + } + + return map; + } + + public bool Mine(float minedAmount) + { + this.amount -= minedAmount; + if (this.amount <= 0) + { + this.type = OreType.Surface; + return true; + } + return false; + } + + + + public OreTile(OreType gettype, int xpos, int ypos, float amountSet) + : base(xpos, ypos) + { + this.type = gettype; + this.amount = amountSet; + } + + public OreTile(System.Random rnk, int xpos, int ypos, float amountSet) + : base(xpos, ypos) + { + this.type = (OreType)rnk.Next(1, 6); + this.amount = rnk.Next(1,(int)amountSet); + + + } + + +} diff --git a/Assets/Ore.cs.meta b/Assets/Tile/OreTile.cs.meta similarity index 100% rename from Assets/Ore.cs.meta rename to Assets/Tile/OreTile.cs.meta diff --git a/Assets/OreType.cs b/Assets/Tile/OreType.cs similarity index 100% rename from Assets/OreType.cs rename to Assets/Tile/OreType.cs diff --git a/Assets/OreType.cs.meta b/Assets/Tile/OreType.cs.meta similarity index 100% rename from Assets/OreType.cs.meta rename to Assets/Tile/OreType.cs.meta diff --git a/Assets/Tile.cs b/Assets/Tile/Tile.cs similarity index 53% rename from Assets/Tile.cs rename to Assets/Tile/Tile.cs index 5ada887..e5a5a92 100644 --- a/Assets/Tile.cs +++ b/Assets/Tile/Tile.cs @@ -3,12 +3,6 @@ public class Tile { public OreType type; public int x, y; - public Tile(OreType t, int xpos, int ypos) - { - this.type = t; - this.x = xpos; - this.y = ypos; - } public Tile(int xpos, int ypos) { diff --git a/Assets/Tile.cs.meta b/Assets/Tile/Tile.cs.meta similarity index 100% rename from Assets/Tile.cs.meta rename to Assets/Tile/Tile.cs.meta diff --git a/Assets/Tiles.cd b/Assets/Tiles.cd index e3bd310..79f09f7 100644 --- a/Assets/Tiles.cd +++ b/Assets/Tiles.cd @@ -7,10 +7,10 @@ Assets\Tile.cs - + - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAA= + AAAAAAAAAAAAAAAAAAAAAAAAAAAAgIAAAAAAAAAAAAA= Assets\Ore.cs diff --git a/Assets/scripts/Assembler.cs b/Assets/scripts/Assembler.cs index 64f55db..6a53a8d 100644 --- a/Assets/scripts/Assembler.cs +++ b/Assets/scripts/Assembler.cs @@ -3,8 +3,7 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class Assembler:Producer { public int speed; @@ -14,4 +13,4 @@ public void Production() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Building.cs b/Assets/scripts/Building.cs index 9bd6c86..9df2614 100644 --- a/Assets/scripts/Building.cs +++ b/Assets/scripts/Building.cs @@ -3,13 +3,15 @@ using System.Linq; using System.Text; -namespace civmain -{ - public abstract class Building + + public class Building { + public List buildingMaterials; + + public void Usage() { throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Class1.cs b/Assets/scripts/Class1.cs index 6e68c48..9b96647 100644 --- a/Assets/scripts/Class1.cs +++ b/Assets/scripts/Class1.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace civmain -{ + + public class MainBuilding { public int Inventory; } -} + diff --git a/Assets/scripts/Food.cs b/Assets/scripts/Food.cs index 90d70eb..8f860de 100644 --- a/Assets/scripts/Food.cs +++ b/Assets/scripts/Food.cs @@ -3,9 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class Food:Item { } -} + diff --git a/Assets/scripts/Furnace.cs b/Assets/scripts/Furnace.cs index 0e4bd9f..23d2da5 100644 --- a/Assets/scripts/Furnace.cs +++ b/Assets/scripts/Furnace.cs @@ -3,8 +3,7 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class Furnace:Producer { public int speed; @@ -14,4 +13,4 @@ public void Production() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Generato.cs b/Assets/scripts/Generato.cs index bdfe552..e856266 100644 --- a/Assets/scripts/Generato.cs +++ b/Assets/scripts/Generato.cs @@ -3,13 +3,12 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class Generator:Building { public MainBuilding main; - public int a; + public int internalsorage; public void Gen() {} @@ -17,10 +16,10 @@ public void Gen() public void Transfer() { - if (this.a > 1) + if (this.internalsorage > 1) { - main.Inventory =+ this.a; + main.Inventory =+ this.internalsorage; } } } -} + diff --git a/Assets/scripts/GlassPLane.cs b/Assets/scripts/GlassPLane.cs index 16087e7..9464bc9 100644 --- a/Assets/scripts/GlassPLane.cs +++ b/Assets/scripts/GlassPLane.cs @@ -3,9 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class GlassPlane:Item { + public string name = "GlassPlane"; + } -} + diff --git a/Assets/scripts/IInventory.cs b/Assets/scripts/IInventory.cs index 1a53394..03e62e6 100644 --- a/Assets/scripts/IInventory.cs +++ b/Assets/scripts/IInventory.cs @@ -3,6 +3,3 @@ using System.Linq; using System.Text; -namespace civmain -{ -} diff --git a/Assets/scripts/InteriorPlate.cs b/Assets/scripts/InteriorPlate.cs index f1e21e1..1a5b741 100644 --- a/Assets/scripts/InteriorPlate.cs +++ b/Assets/scripts/InteriorPlate.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class InteriorPlate:Item { + public string name = "InteriorPlate"; } -} + diff --git a/Assets/scripts/Iron.cs b/Assets/scripts/Iron.cs index a4371bb..f08062c 100644 --- a/Assets/scripts/Iron.cs +++ b/Assets/scripts/Iron.cs @@ -3,9 +3,10 @@ using System.Linq; using System.Text; -namespace civmain -{ - public class Iron:Ore + + public class IronOre:Ore { + public string name = "Iron" + "Ore"; + } -} + diff --git a/Assets/scripts/IronIngot.cs b/Assets/scripts/IronIngot.cs index ed07c1c..0809203 100644 --- a/Assets/scripts/IronIngot.cs +++ b/Assets/scripts/IronIngot.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class IronIngot:Item { + public string name = "IronIngot"; } -} + diff --git a/Assets/scripts/IronPipe.cs b/Assets/scripts/IronPipe.cs index c41f4f4..035bc42 100644 --- a/Assets/scripts/IronPipe.cs +++ b/Assets/scripts/IronPipe.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + public class IronPipe:Item { + public string name = "IronPipe"; } -} + diff --git a/Assets/scripts/IronPlate.cs b/Assets/scripts/IronPlate.cs index 0f8d832..97651b0 100644 --- a/Assets/scripts/IronPlate.cs +++ b/Assets/scripts/IronPlate.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class IronPlate:Item { + public string name = "IronPlate"; } -} diff --git a/Assets/scripts/Item.cs b/Assets/scripts/Item.cs index 48234c5..989b8d0 100644 --- a/Assets/scripts/Item.cs +++ b/Assets/scripts/Item.cs @@ -3,9 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Item { + public int amount; + } -} + diff --git a/Assets/scripts/MainDiagram.cd.meta b/Assets/scripts/ItemsDia.cd.meta similarity index 64% rename from Assets/scripts/MainDiagram.cd.meta rename to Assets/scripts/ItemsDia.cd.meta index 1ece9bd..93782b5 100644 --- a/Assets/scripts/MainDiagram.cd.meta +++ b/Assets/scripts/ItemsDia.cd.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 74c7cc69985d0d44a8a7075c4cda6e8f -timeCreated: 1437723296 +guid: e44dc108d9cc8e745b4b83e9a0b7a660 +timeCreated: 1437854894 licenseType: Free DefaultImporter: userData: diff --git a/Assets/scripts/MainDiagram.cd b/Assets/scripts/MainDiagram.cd deleted file mode 100644 index c373ebe..0000000 --- a/Assets/scripts/MainDiagram.cd +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA= - Class1.cs - - - - - - AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Miner.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA= - Building.cs - - - - - - AAIAAAAAAAAAAAAAAAIAAAAAAAABAAAAAAAAAAAAAAA= - SpecMine.cs - - - - - - AAAAAAAAAAAAAABAAAIAAAAAAAAAAQAAAAAAAAAAAAA= - Oxigeneration.cs - - - - - - AAAAAAAAAAAAAABAAAAAAQAAAAAAAAAgAAAAAAAAAAQ= - Generato.cs - - - - - - AAAAAAAAAAAAAIAAAAIAAAAAAAABAQAAAAAAAAAAAAA= - UniverzalMiner.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - WareHouse.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Item.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Ore.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - coal.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Iron.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Uranium.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Food.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Tool.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACABAAAAAAAAAA= - ResearchFacility.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Stone.cs - - - - - - AAAAAAAAAAAAAABAAAAAAAAAAAAAAQAAAAAAAAAAAAA= - Furnace.cs - - - - - - AAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Producer.cs - - - - - - AAAAAAAAAAAAAABAAAAAAAAAAAAAAQAAAAAAAAAAAAA= - Assembler.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - IronIngot.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - IronPipe.cs - - - - - - AAAAAAAAEAAAQAAEAAAAAAAAIAAAAQAAACAAAAAAAAA= - Player.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - StoneBrick.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - IronPlate.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - NuclearReactor.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - GlassPLane.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - InteriorPlate.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Roof.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - RefrinedUranium.cs - - - - - - AAAAAAAAAAAAAABAAAAAAAAAAAAAAQAAAAAAAAAAAAA= - UraniumRefiner.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA= - OreType.cs - - - - \ No newline at end of file diff --git a/Assets/scripts/Miner.cs b/Assets/scripts/Miner.cs index c7ddb79..e1403c2 100644 --- a/Assets/scripts/Miner.cs +++ b/Assets/scripts/Miner.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Miner : Generator { @@ -13,4 +13,4 @@ public void Mine() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/NuclearReactor.cs b/Assets/scripts/NuclearReactor.cs index 64a15ee..2500450 100644 --- a/Assets/scripts/NuclearReactor.cs +++ b/Assets/scripts/NuclearReactor.cs @@ -3,10 +3,10 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class NuclearReactor:Building { } -} + diff --git a/Assets/scripts/Ore.cs b/Assets/scripts/Ore.cs index 26ac6ba..e743087 100644 --- a/Assets/scripts/Ore.cs +++ b/Assets/scripts/Ore.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Ore:Item { } -} + diff --git a/Assets/scripts/OreType.cs b/Assets/scripts/OreType.cs index 59e7757..3b96b8c 100644 --- a/Assets/scripts/OreType.cs +++ b/Assets/scripts/OreType.cs @@ -3,10 +3,4 @@ using System.Linq; using System.Text; -namespace civmain -{ - public enum OreType - { - Surface, - } -} + diff --git a/Assets/scripts/Oxigeneration.cs b/Assets/scripts/Oxigeneration.cs index d9a5933..d9b3e92 100644 --- a/Assets/scripts/Oxigeneration.cs +++ b/Assets/scripts/Oxigeneration.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Oxigenerator:Generator { public int speed; @@ -16,4 +16,4 @@ public void Get(int slot, int amount) throw new NotImplementedException(); } } -} + diff --git a/Assets/scripts/Player.cs b/Assets/scripts/Player.cs deleted file mode 100644 index 856eedb..0000000 --- a/Assets/scripts/Player.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace civmain -{ - public class Player - { - public int eatSpeed; - public int breathAmount; - public int speed; - - public void Eat() - { - throw new System.NotImplementedException(); - } - - public void Breath() - { - throw new System.NotImplementedException(); - } - - public void walk() - { - throw new System.NotImplementedException(); - } - } -} diff --git a/Assets/scripts/Producer.cs b/Assets/scripts/Producer.cs index aebf715..5b72c95 100644 --- a/Assets/scripts/Producer.cs +++ b/Assets/scripts/Producer.cs @@ -3,11 +3,13 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Producer:Building { public void Production() - {} + { + throw new System.NotImplementedException(); + } } -} + diff --git a/Assets/scripts/RefrinedUranium.cs b/Assets/scripts/RefrinedUranium.cs index f36a28b..6a02816 100644 --- a/Assets/scripts/RefrinedUranium.cs +++ b/Assets/scripts/RefrinedUranium.cs @@ -3,9 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class RefrinedUranium:Item { + public string name = "RefrinedUranium"; + } -} + diff --git a/Assets/scripts/ResearchFacility.cs b/Assets/scripts/ResearchFacility.cs index 42b42d5..867b6df 100644 --- a/Assets/scripts/ResearchFacility.cs +++ b/Assets/scripts/ResearchFacility.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class ResearchFacility:Building { private int researchspeed; @@ -14,4 +14,4 @@ public void Research() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Resource.cs b/Assets/scripts/Resource.cs index 5a1596e..773f40b 100644 --- a/Assets/scripts/Resource.cs +++ b/Assets/scripts/Resource.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Resource:Item { } -} + diff --git a/Assets/scripts/Roof.cs b/Assets/scripts/Roof.cs index 611936d..55c4090 100644 --- a/Assets/scripts/Roof.cs +++ b/Assets/scripts/Roof.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Roof:Item { + public string name = "Roof"; } -} diff --git a/Assets/scripts/SpecMine.cs b/Assets/scripts/SpecMine.cs index e2998bf..066be18 100644 --- a/Assets/scripts/SpecMine.cs +++ b/Assets/scripts/SpecMine.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class SpecMine : Miner { public OreType type; @@ -15,4 +15,4 @@ public void Mine() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Stone.cs b/Assets/scripts/Stone.cs index f7e0079..fb7515f 100644 --- a/Assets/scripts/Stone.cs +++ b/Assets/scripts/Stone.cs @@ -3,9 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ - public class Stone:Ore + + + public class StoneOre:Ore { + public string name = "Stone"+"Ore"; + } -} + diff --git a/Assets/scripts/StoneBrick.cs b/Assets/scripts/StoneBrick.cs index f2d4b3b..a34a5c3 100644 --- a/Assets/scripts/StoneBrick.cs +++ b/Assets/scripts/StoneBrick.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class StoneBrick:Item { } -} + diff --git a/Assets/scripts/Tool.cs b/Assets/scripts/Tool.cs index 5d700e3..64d14ab 100644 --- a/Assets/scripts/Tool.cs +++ b/Assets/scripts/Tool.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Tool:Item { } -} + diff --git a/Assets/scripts/UniverzalMiner.cs b/Assets/scripts/UniverzalMiner.cs index 057320c..87f18fa 100644 --- a/Assets/scripts/UniverzalMiner.cs +++ b/Assets/scripts/UniverzalMiner.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class UniverzalMiner:Miner { public int capacity; @@ -16,4 +16,4 @@ public void MIne() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/Uranium.cs b/Assets/scripts/Uranium.cs index f460cef..0975df0 100644 --- a/Assets/scripts/Uranium.cs +++ b/Assets/scripts/Uranium.cs @@ -3,9 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ - public class Uranium:Ore + + + public class UraniumOre:Ore { + public string name = "Uranium" + "Ore"; + } -} + diff --git a/Assets/scripts/UraniumRefiner.cs b/Assets/scripts/UraniumRefiner.cs index 7143f91..83b2fcf 100644 --- a/Assets/scripts/UraniumRefiner.cs +++ b/Assets/scripts/UraniumRefiner.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class UraniumRefiner:Producer { public int speed; @@ -14,4 +14,4 @@ public void Production() throw new System.NotImplementedException(); } } -} + diff --git a/Assets/scripts/WareHouse.cs b/Assets/scripts/WareHouse.cs index d68df1f..84a0ada 100644 --- a/Assets/scripts/WareHouse.cs +++ b/Assets/scripts/WareHouse.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class WareHouse:Building { } -} + diff --git a/Assets/scripts/Wood.cs b/Assets/scripts/Wood.cs index 7680bdf..71acbeb 100644 --- a/Assets/scripts/Wood.cs +++ b/Assets/scripts/Wood.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; -namespace civmain -{ + + public class Wood:Resource { } -} + diff --git a/Assets/scripts/coal.cs b/Assets/scripts/coal.cs index 6615d54..73f027a 100644 --- a/Assets/scripts/coal.cs +++ b/Assets/scripts/coal.cs @@ -3,10 +3,11 @@ using System.Linq; using System.Text; -namespace civmain -{ - public class Coal:Ore + + + public class CoalOre:Ore { + } -} +