Commit 4e09397b by Naliwe GS

Need to add gameplay and HUD

parent c31cdab8
...@@ -2,12 +2,7 @@ ...@@ -2,12 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="59a76139-b7c6-419c-b685-d99043abb4e4" name="Default" comment=""> <list default="true" id="59a76139-b7c6-419c-b685-d99043abb4e4" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../ProjectSettings/GraphicsSettings.asset" afterPath="$PROJECT_DIR$/../../ProjectSettings/GraphicsSettings.asset" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../ProjectSettings/ProjectSettings.asset" afterPath="$PROJECT_DIR$/../../ProjectSettings/ProjectSettings.asset" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../Assets/Scripts/GameController.cs" afterPath="$PROJECT_DIR$/../../Assets/Scripts/GameController.cs" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs" afterPath="$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../ProjectSettings/ProjectVersion.txt" afterPath="$PROJECT_DIR$/../../ProjectSettings/ProjectVersion.txt" />
</list> </list>
<ignored path="igem-quantifly.iws" /> <ignored path="igem-quantifly.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
...@@ -29,79 +24,35 @@ ...@@ -29,79 +24,35 @@
<component name="FileEditorManager"> <component name="FileEditorManager">
<splitter split-orientation="horizontal" split-proportion="0.5"> <splitter split-orientation="horizontal" split-proportion="0.5">
<split-first> <split-first>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf>
<file leaf-file-name="CellularAutomaton.cs" pinned="false" current-in-tab="true"> <file leaf-file-name="GameController.cs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-881">
<caret line="3" column="17" selection-start-line="3" selection-start-column="17" selection-end-line="3" selection-end-column="17" />
<folding>
<marker date="1476631531534" expanded="true" signature="6:139" ph="..." />
<marker date="1476631531534" expanded="true" signature="179:3168" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="221:600" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="280:325" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="380:425" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="493:594" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="636:3166" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="651:913" ph="Delegates" />
<marker date="1476631531534" expanded="true" signature="923:1179" ph="Fields" />
<marker date="1476631531534" expanded="true" signature="1189:1679" ph="Ctors" />
<marker date="1476631531534" expanded="true" signature="1298:1659" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="1689:3160" ph="Methods" />
<marker date="1476631531534" expanded="true" signature="1732:2101" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2177:2834" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2899:2961" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="3026:3140" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Cell.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/Cell.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255"> <state relative-caret-position="68">
<caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" /> <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding> <folding>
<marker date="1470048894837" expanded="true" signature="6:46" ph="..." /> <marker date="1476654271367" expanded="true" signature="6:97" ph="..." />
<marker date="1470048894837" expanded="true" signature="86:437" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="110:435" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="155:542" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="125:249" ph="Fields" /> <marker date="1476654271367" expanded="true" signature="262:536" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="259:429" ph="Ctors" /> <marker date="1476654271367" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="322:409" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476654271367" expanded="true" signature="1221:1265" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Map.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/Utils/Map.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</split-first> </split-first>
<split-second> <split-second>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf>
<file leaf-file-name="GameController.cs" pinned="false" current-in-tab="true"> <file leaf-file-name="NewBehaviourScript.cs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/NewBehaviourScript.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405"> <state relative-caret-position="255">
<caret line="27" column="8" selection-start-line="27" selection-start-column="8" selection-end-line="27" selection-end-column="8" /> <caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
<folding> <folding />
<marker date="1476634864569" expanded="true" signature="6:96" ph="..." />
<marker date="1476634864569" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="1221:1265" ph="{...}" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -124,9 +75,10 @@ ...@@ -124,9 +75,10 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="y" value="27" /> <option name="x" value="-8" />
<option name="width" value="1920" /> <option name="y" value="-8" />
<option name="height" value="1053" /> <option name="width" value="1936" />
<option name="height" value="1056" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true"> <component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" /> <OptionsSetting value="true" id="Add" />
...@@ -199,32 +151,6 @@ ...@@ -199,32 +151,6 @@
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" /> <option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="Utils" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="igem-quantifly (1 project)" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Assembly-CSharp" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Assets" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Scripts" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="MapGeneration" /> <option name="myItemId" value="MapGeneration" />
<option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" /> <option name="myItemType" value="com.jetbrains.resharper.projectView.solutionExplorer.SolutionExplorerNodeRider" />
</PATH_ELEMENT> </PATH_ELEMENT>
...@@ -289,11 +215,12 @@ ...@@ -289,11 +215,12 @@
<workItem from="1476627994724" duration="3690000" /> <workItem from="1476627994724" duration="3690000" />
<workItem from="1476632678696" duration="296000" /> <workItem from="1476632678696" duration="296000" />
<workItem from="1476633454562" duration="1491000" /> <workItem from="1476633454562" duration="1491000" />
<workItem from="1476654268053" duration="92000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="6426000" /> <option name="totallyTimeSpent" value="6518000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
...@@ -305,7 +232,7 @@ ...@@ -305,7 +232,7 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="27" width="1920" height="1053" extended-state="6" /> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Change Signature" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Change Signature" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
...@@ -341,41 +268,64 @@ ...@@ -341,41 +268,64 @@
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60"> <state relative-caret-position="51">
<caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" /> <caret line="3" column="17" selection-start-line="3" selection-start-column="17" selection-end-line="3" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/Cell.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/Utils/Map.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
<folding> <folding>
<marker date="1476631531534" expanded="true" signature="6:139" ph="..." /> <marker date="1476654271367" expanded="true" signature="6:97" ph="..." />
<marker date="1476631531534" expanded="true" signature="179:3168" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="221:600" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="280:325" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="380:425" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="493:594" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="636:3166" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="1221:1265" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="651:913" ph="Delegates" />
<marker date="1476631531534" expanded="true" signature="923:1179" ph="Fields" />
<marker date="1476631531534" expanded="true" signature="1189:1679" ph="Ctors" />
<marker date="1476631531534" expanded="true" signature="1298:1659" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="1689:3160" ph="Methods" />
<marker date="1476631531534" expanded="true" signature="1732:2101" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2177:2834" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2899:2961" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="3026:3140" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding> <folding>
<marker date="1476634864569" expanded="true" signature="6:96" ph="..." /> <marker date="1476654271367" expanded="true" signature="6:97" ph="..." />
<marker date="1476634864569" expanded="true" signature="122:1273" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="155:542" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="262:536" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="591:1271" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="859:1198" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="1221:1265" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="1221:1265" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -384,24 +334,7 @@ ...@@ -384,24 +334,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105"> <state relative-caret-position="105">
<caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" /> <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
<folding> <folding />
<marker date="1476631531534" expanded="true" signature="6:139" ph="..." />
<marker date="1476631531534" expanded="true" signature="179:3168" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="221:600" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="280:325" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="380:425" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="493:594" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="636:3166" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="651:913" ph="Delegates" />
<marker date="1476631531534" expanded="true" signature="923:1179" ph="Fields" />
<marker date="1476631531534" expanded="true" signature="1189:1679" ph="Ctors" />
<marker date="1476631531534" expanded="true" signature="1298:1659" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="1689:3160" ph="Methods" />
<marker date="1476631531534" expanded="true" signature="1732:2101" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2177:2834" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2899:2961" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="3026:3140" ph="{...}" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -410,13 +343,13 @@ ...@@ -410,13 +343,13 @@
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="28" selection-start-line="0" selection-start-column="28" selection-end-line="0" selection-end-column="28" /> <caret line="0" column="28" selection-start-line="0" selection-start-column="28" selection-end-line="0" selection-end-column="28" />
<folding> <folding>
<marker date="1476634864569" expanded="true" signature="6:96" ph="..." /> <marker date="1476654271367" expanded="true" signature="6:97" ph="..." />
<marker date="1476634864569" expanded="true" signature="122:1273" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="155:542" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="262:536" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="591:1271" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="859:1198" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="1221:1265" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="1221:1265" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -425,24 +358,7 @@ ...@@ -425,24 +358,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1815"> <state relative-caret-position="1815">
<caret line="121" column="0" selection-start-line="121" selection-start-column="0" selection-end-line="121" selection-end-column="0" /> <caret line="121" column="0" selection-start-line="121" selection-start-column="0" selection-end-line="121" selection-end-column="0" />
<folding> <folding />
<marker date="1476631531534" expanded="true" signature="6:139" ph="..." />
<marker date="1476631531534" expanded="true" signature="179:3168" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="221:600" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="280:325" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="380:425" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="493:594" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="636:3166" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="651:913" ph="Delegates" />
<marker date="1476631531534" expanded="true" signature="923:1179" ph="Fields" />
<marker date="1476631531534" expanded="true" signature="1189:1679" ph="Ctors" />
<marker date="1476631531534" expanded="true" signature="1298:1659" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="1689:3160" ph="Methods" />
<marker date="1476631531534" expanded="true" signature="1732:2101" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2177:2834" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2899:2961" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="3026:3140" ph="{...}" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -453,73 +369,51 @@ ...@@ -453,73 +369,51 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$USER_HOME$/.local/share/JetBrains/Shared/v07/DecompilerCache/decompiler/5A2748CB-8DB8-4A56-B1DB-8F59D9BDA51F/0d/f5d64388/GC.cs"> <entry file="file://$USER_HOME$/.local/share/JetBrains/Shared/v07/DecompilerCache/decompiler/5A2748CB-8DB8-4A56-B1DB-8F59D9BDA51F/0d/f5d64388/GC.cs" />
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/Cell.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165"> <state relative-caret-position="255">
<caret line="11" column="22" selection-start-line="11" selection-start-column="22" selection-end-line="11" selection-end-column="22" /> <caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/Utils/Map.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="-881">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="3" column="17" selection-start-line="3" selection-start-column="17" selection-end-line="3" selection-end-column="17" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/Cell.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/NewBehaviourScript.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255"> <state relative-caret-position="255">
<caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" /> <caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
<folding> <folding />
<marker date="1470048894837" expanded="true" signature="6:46" ph="..." />
<marker date="1470048894837" expanded="true" signature="86:437" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="110:435" ph="{...}" />
<marker date="1470048894837" expanded="true" signature="125:249" ph="Fields" />
<marker date="1470048894837" expanded="true" signature="259:429" ph="Ctors" />
<marker date="1470048894837" expanded="true" signature="322:409" ph="{...}" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/Utils/Map.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405"> <state relative-caret-position="357">
<caret line="27" column="8" selection-start-line="27" selection-start-column="8" selection-end-line="27" selection-end-column="8" /> <caret line="21" column="0" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<folding> <folding />
<marker date="1476634864569" expanded="true" signature="6:96" ph="..." />
<marker date="1476634864569" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476634864569" expanded="true" signature="1221:1265" ph="{...}" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../Assets/Scripts/MapGeneration/CellularAutomaton.cs"> <entry file="file://$PROJECT_DIR$/../../Assets/Scripts/GameController.cs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-881"> <state relative-caret-position="68">
<caret line="3" column="17" selection-start-line="3" selection-start-column="17" selection-end-line="3" selection-end-column="17" /> <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding> <folding>
<marker date="1476631531534" expanded="true" signature="6:139" ph="..." /> <marker date="1476654271367" expanded="true" signature="6:97" ph="..." />
<marker date="1476631531534" expanded="true" signature="179:3168" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="122:1273" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="221:600" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="155:542" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="280:325" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="262:536" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="380:425" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="591:1271" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="493:594" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="859:1198" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="636:3166" ph="{...}" /> <marker date="1476654271367" expanded="true" signature="1221:1265" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="651:913" ph="Delegates" />
<marker date="1476631531534" expanded="true" signature="923:1179" ph="Fields" />
<marker date="1476631531534" expanded="true" signature="1189:1679" ph="Ctors" />
<marker date="1476631531534" expanded="true" signature="1298:1659" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="1689:3160" ph="Methods" />
<marker date="1476631531534" expanded="true" signature="1732:2101" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2177:2834" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="2899:2961" ph="{...}" />
<marker date="1476631531534" expanded="true" signature="3026:3140" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: a0438dee19db39d4f8e47a6a83709b0e guid: 0dcaa528c3d6b304987dad5504a14b70
timeCreated: 1469997714 folderAsset: yes
timeCreated: 1475322288
licenseType: Free licenseType: Free
NativeFormatImporter: DefaultImporter:
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
fileFormatVersion: 2
guid: b3d5feb9f4e6ba04798dbfcab5599481
timeCreated: 1476749624
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: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
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: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings:
- buildTarget: Standalone
maxTextureSize: 8192
textureFormat: -2
compressionQuality: 50
allowsAlphaSplitting: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ec51cb931534401419d3e3af7374cfdf
timeCreated: 1476749627
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: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
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: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 200
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings:
- buildTarget: Standalone
maxTextureSize: 8192
textureFormat: -3
compressionQuality: 50
allowsAlphaSplitting: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a3dc2b557aa1b724fb1d4f3e26dfbb5e
timeCreated: 1476749619
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: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
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: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
No preview for this file type
...@@ -11,12 +11,10 @@ namespace Assets.Scripts ...@@ -11,12 +11,10 @@ namespace Assets.Scripts
public static bool CanGrow(Cell cell) public static bool CanGrow(Cell cell)
{ {
if (cell.Position.y == 0)
if (cell.Position.x == 0)
return true; return true;
if (cell.Position.x % 10 == 0) if (cell.Position.x%4 == 0)
return (cell.Position.y < 16 && (cell.Position.y * r.Next(100)) / 100 return cell.Position.y < 16 && ((100/cell.Position.y)) > 6 + r.Next(94);
< 50);
return false; return false;
} }
} }
...@@ -25,6 +23,8 @@ namespace Assets.Scripts ...@@ -25,6 +23,8 @@ namespace Assets.Scripts
{ {
public static int PoolSize = 256; public static int PoolSize = 256;
public GameObject Wall;
private Map _map; private Map _map;
private ObjectPool _pooledWalls; private ObjectPool _pooledWalls;
...@@ -33,6 +33,8 @@ namespace Assets.Scripts ...@@ -33,6 +33,8 @@ namespace Assets.Scripts
private CellularAutomaton _ca; private CellularAutomaton _ca;
private GameObject[] _tiles;
void Start() void Start()
{ {
_map = new Map(128, 128); _map = new Map(128, 128);
...@@ -41,13 +43,44 @@ namespace Assets.Scripts ...@@ -41,13 +43,44 @@ namespace Assets.Scripts
_pooledProjectiles = new ObjectPool(PoolSize); _pooledProjectiles = new ObjectPool(PoolSize);
_pooledWalls = new ObjectPool(PoolSize); _pooledWalls = new ObjectPool(PoolSize);
_ca = new CellularAutomaton(_map, TileType.Wall); _ca = new CellularAutomaton(_map, TileType.Wall) {CanGrowRule = CADelegates.CanGrow};
_ca.CanGrowRule = CADelegates.CanGrow; _tiles = new GameObject[_map.Columns*_map.Rows];
for (uint i = 0 ; i < _map.Columns * _map.Rows ; i++)
{
_tiles[i] = (GameObject) Instantiate(Wall, new Vector3(0, 0, 0), Quaternion.identity);
_tiles[i].SetActive(false);
}
} }
void Update() void Update()
{ {
_ca.Step(); Camera.main.transform.Translate(new Vector3(0.5f * Time.deltaTime, 0, 0));
var rightBorder = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width,
Screen.height, 0)).x;
var leftBorder = Camera.main.ScreenToWorldPoint(new Vector3(0, 0, 0)).x;
_ca.Step(rightBorder);
DrawMap(leftBorder, rightBorder);
// Debug.Log(_map);
}
void DrawMap(float min, float max)
{
for (uint y = 0; y < _map.Rows; y++)
{
for (uint x = (uint) min % _map.Columns; x < max + 1 % _map.Columns; x++)
{
if (_map[x, y] == TileType.Wall)
{
var tile = _tiles[_map.Columns * y + x];
var newX = (uint) (min / _map.Columns) * _map.Columns + x;
tile.transform.position = new Vector3(newX, y, 0);
tile.SetActive(true);
}
}
}
} }
} }
} }
\ No newline at end of file
...@@ -14,7 +14,7 @@ namespace Assets.Scripts.MapGeneration ...@@ -14,7 +14,7 @@ namespace Assets.Scripts.MapGeneration
#region Ctors #region Ctors
public Cell(int x, int y, TileType type) public Cell(uint x, uint y, TileType type)
{ {
Type = type; Type = type;
Position = new Vector2(x, y); Position = new Vector2(x, y);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.Remoting.Messaging;
using Assets.Scripts.Utils; using Assets.Scripts.Utils;
using UnityEngine; using UnityEngine;
...@@ -18,11 +19,6 @@ namespace Assets.Scripts.MapGeneration ...@@ -18,11 +19,6 @@ namespace Assets.Scripts.MapGeneration
{ {
return true; return true;
} }
public static Cell DefaultPickTarget(Map map, Cell origin)
{
return CellularAutomaton.GetNeighbors(map, origin).FirstOrDefault();
}
} }
public class CellularAutomaton public class CellularAutomaton
...@@ -54,39 +50,64 @@ namespace Assets.Scripts.MapGeneration ...@@ -54,39 +50,64 @@ namespace Assets.Scripts.MapGeneration
#region Ctors #region Ctors
public CellularAutomaton(Map map, TileType targetType, int startX = 0, int startY = 0) public CellularAutomaton(Map map, TileType targetType, uint startX = 0, uint startY = 0)
{ {
_map = map; _map = map;
_targetType = targetType; _targetType = targetType;
CanGrowRule = DefaultCellDelegates.DefaultCanGrow; CanGrowRule = DefaultCellDelegates.DefaultCanGrow;
WillGrowRule = DefaultCellDelegates.DefaultWillGrow; WillGrowRule = DefaultCellDelegates.DefaultWillGrow;
PickTargetRule = DefaultCellDelegates.DefaultPickTarget;
_toProcess = new List<Cell> {new Cell(startX, startY, targetType)}; _toProcess = new List<Cell> {new Cell(startX, startY, targetType)};
_map[startX, startY] = targetType;
ApplyToMap(_toProcess);
} }
#endregion #endregion
#region Methods #region Methods
public void Step() public void Step(float max)
{ {
if (!_toProcess.Any())
return;
var newCells = new List<Cell>(); var newCells = new List<Cell>();
foreach (var cell in _toProcess) foreach (var cell in _toProcess)
{ {
if (!CanGrowRule(cell) || !WillGrowRule(cell)) if (!NeedToCompute(cell, max))
{
newCells.Add(cell);
continue; continue;
}
Grow(PickTargetRule(_map, cell), _targetType); foreach (var target in GetNeighbors(_map, cell))
{
if (!CanGrowRule(target) || !WillGrowRule(target))
continue;
newCells.Add(cell); Grow(target, _targetType);
}
newCells.Add(target);
}
}
ApplyToMap(newCells);
_toProcess = newCells; _toProcess = newCells;
} }
private bool NeedToCompute(Cell cell, float max)
{
return cell.Position.x < max % _map.Columns;
}
public void ApplyToMap(List<Cell> cells)
{
foreach (var cell in cells)
{
_map[(uint) cell.Position.x, (uint) cell.Position.y] = cell.Type;
}
}
public static IEnumerable<Cell> GetNeighbors(Map map, Cell origin) public static IEnumerable<Cell> GetNeighbors(Map map, Cell origin)
{ {
var ret = new List<Cell>(); var ret = new List<Cell>();
...@@ -98,7 +119,7 @@ namespace Assets.Scripts.MapGeneration ...@@ -98,7 +119,7 @@ namespace Assets.Scripts.MapGeneration
if ((Math.Abs(x - origin.Position.x) > .1f || Math.Abs(y - origin.Position.y) > .1f) if ((Math.Abs(x - origin.Position.x) > .1f || Math.Abs(y - origin.Position.y) > .1f)
&& IsInMapRange(map, (int) x, (int) y) && map[(uint) x, (uint) y] != origin.Type) && IsInMapRange(map, (int) x, (int) y) && map[(uint) x, (uint) y] != origin.Type)
{ {
ret.Add(new Cell((int) x, (int) y, map[(uint) x, (uint) y])); ret.Add(new Cell((uint) x, (uint) y, map[(uint) x, (uint) y]));
} }
} }
} }
......
...@@ -43,5 +43,21 @@ ...@@ -43,5 +43,21 @@
get { return _map[x, y]; } get { return _map[x, y]; }
set { _map[x, y] = value; } set { _map[x, y] = value; }
} }
public override string ToString()
{
string ret = "";
for (int y = 0; y < Rows; y++)
{
for (int x = 0; x < Columns; x++)
{
ret += _map[x, y] + " ";
}
ret += "\n";
}
return ret;
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment