I_Jemin

Refact

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="$PROJECT_DIR$" t="IncludeRecursive">
<e p="Assembly-CSharp-Editor-firstpass.csproj" t="IncludeRecursive" />
<e p="Assembly-CSharp.csproj" t="IncludeRecursive" />
<e p="Assets" t="Include">
<e p="Plugins" t="Include">
<e p="Editor" t="Include">
<e p="JetBrains" t="Include">
<e p="Unity3DRider.cs" t="Include" />
</e>
</e>
</e>
<e p="Scripts" t="Include">
<e p="Bird.cs" t="Include" />
<e p="Column.cs" t="Include" />
<e p="ColumnPool.cs" t="Include" />
<e p="GameControl.cs" t="Include" />
<e p="IUnityInput.cs" t="Include" />
<e p="RepeatingBackground.cs" t="Include" />
<e p="ScrollingObject.cs" t="Include" />
</e>
<e p="Test Scripts" t="Include">
<e p="BirdTest.cs" t="Include" />
</e>
</e>
<e p="Bird-TDD.sln" t="IncludeFlat" />
<e p="Library" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive" />
<e p="packages" t="ExcludeRecursive" />
<e p="Temp" t="ExcludeRecursive">
<e p="bin" t="ExcludeRecursive" />
</e>
</e>
<e p="$USER_HOME$/Library/Caches/Rider2017.3/resharper-host/local/Transient/ReSharperHost/v11/SolutionCaches/_Bird-TDD.-1979534893.00" t="ExcludeRecursive" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Bird-TDD/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Bird-TDD/riderModule.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ed0f3816-f0b0-4fd8-83c6-3ab16fe8493e" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Bird.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/Bird.cs" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" />
<change beforePath="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" afterPath="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="BirdTest.cs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1905">
<caret line="136" column="56" lean-forward="false" selection-start-line="136" selection-start-column="56" selection-end-line="136" selection-end-column="56" />
<folding>
<marker date="1519454701714" expanded="false" signature="6:279" ph="..." />
<marker date="1519454701714" expanded="true" signature="315:5213" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="343:3630" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="440:762" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="846:1243" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="1318:1460" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="1554:1943" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2032:2252" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2357:2648" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2749:3131" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3243:3615" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3668:5209" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3729:3970" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4079:4272" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4399:4752" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4867:5203" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Bird.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="397">
<caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="28" />
<folding>
<marker date="1519454647412" expanded="false" signature="6:44" ph="..." />
<marker date="1519454647412" expanded="true" signature="138:2030" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="536:601" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="616:926" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="871:920" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="942:1131" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1015:1128" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1102:1124" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1176:1470" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1513:1719" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1550:1716" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1558:1674" ph="/* If the bird hits the trigger collider in between the columns then ... */" />
<marker date="1519454647412" expanded="true" signature="1740:2028" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1906:1983" ph="/* new Vector2(rb2d.velocity.x, 0); ... */" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ColumnPool.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="382">
<caret line="40" column="32" lean-forward="false" selection-start-line="40" selection-start-column="32" selection-end-line="40" selection-end-column="32" />
<folding>
<marker date="1519453840691" expanded="false" signature="6:44" ph="..." />
<marker date="1519453840691" expanded="true" signature="86:2286" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1048:1458" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1275:1452" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1537:2284" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1682:2278" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="2205:2268" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="IUnityInput.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1519401611906" expanded="true" signature="55:102" ph="{...}" />
<marker date="1519401611906" expanded="true" signature="155:273" ph="{...}" />
<marker date="1519401611906" expanded="true" signature="206:266" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="GameControl.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179">
<caret line="53" column="19" lean-forward="false" selection-start-line="53" selection-start-column="19" selection-end-line="53" selection-end-column="19" />
<folding>
<marker date="1519454376673" expanded="false" signature="6:123" ph="..." />
<marker date="1519454376673" expanded="true" signature="165:1725" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="682:946" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="691:943" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="720:751" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="759:918" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="839:913" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="962:1191" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1077:1188" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1218:1478" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1382:1475" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1503:1661" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1534:1609" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1683:1722" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="RepeatingBackground.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1519397133348" expanded="false" signature="6:44" ph="..." />
<marker date="1519397133348" expanded="true" signature="95:1674" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="405:655" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="709:1072" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="926:1069" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="1213:1672" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ScrollingObject.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
<folding>
<marker date="1519453849709" expanded="false" signature="6:78" ph="..." />
<marker date="1519453849709" expanded="true" signature="165:756" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="242:520" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="536:754" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="625:666" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="673:751" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>gameOvertext</find>
<find>OnCollisionEnter2D</find>
<find>score</find>
<find>Instance</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs" root0="FORCE_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Bird.cs" />
<option value="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-1" />
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="877" />
</component>
<component name="ProjectView">
<navigator currentView="SolutionExplorer" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="SolutionExplorer">
<subPane>
<expand>
<path>
<item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
<item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
</path>
<path>
<item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
<item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
</path>
<path>
<item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
<item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
</path>
<path>
<item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
<item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Scripts" type="977d5f41:SolutionExplorerNodeRider" />
</path>
<path>
<item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
<item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
<item name="Test Scripts" type="977d5f41:SolutionExplorerNodeRider" />
</path>
</expand>
<select />
</subPane>
<option name="show-file-system" value="false" />
<option name="show-all-items" value="false" />
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" />
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ed0f3816-f0b0-4fd8-83c6-3ab16fe8493e" name="Default" comment="" />
<created>1519453143118</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1519453143118</updated>
<workItem from="1519453146473" duration="1701000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="1701000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-1" y="23" width="1440" height="877" extended-state="6" />
<layout>
<window_info id="TODO" 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="6" side_tool="false" content_ui="tabs" />
<window_info id="Errors In Solution" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" 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="-1" side_tool="true" content_ui="tabs" />
<window_info id="Unit Tests" 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="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" 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="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" 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="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" 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="-1" side_tool="false" content_ui="tabs" />
<window_info id="NuGet" 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="-1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2532189" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" 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="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1519401611906" expanded="true" signature="55:102" ph="{...}" />
<marker date="1519401611906" expanded="true" signature="155:273" ph="{...}" />
<marker date="1519401611906" expanded="true" signature="206:266" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
<folding>
<marker date="1519453849709" expanded="false" signature="6:78" ph="..." />
<marker date="1519453849709" expanded="true" signature="165:756" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="242:520" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="536:754" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="625:666" ph="{...}" />
<marker date="1519453849709" expanded="true" signature="673:751" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1519397133348" expanded="false" signature="6:44" ph="..." />
<marker date="1519397133348" expanded="true" signature="95:1674" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="405:655" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="709:1072" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="926:1069" ph="{...}" />
<marker date="1519397133348" expanded="true" signature="1213:1672" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179">
<caret line="53" column="19" lean-forward="false" selection-start-line="53" selection-start-column="19" selection-end-line="53" selection-end-column="19" />
<folding>
<marker date="1519454376673" expanded="false" signature="6:123" ph="..." />
<marker date="1519454376673" expanded="true" signature="165:1725" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="682:946" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="691:943" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="720:751" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="759:918" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="839:913" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="962:1191" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1077:1188" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1218:1478" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1382:1475" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1503:1661" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1534:1609" ph="{...}" />
<marker date="1519454376673" expanded="true" signature="1683:1722" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="382">
<caret line="40" column="32" lean-forward="false" selection-start-line="40" selection-start-column="32" selection-end-line="40" selection-end-column="32" />
<folding>
<marker date="1519453840691" expanded="false" signature="6:44" ph="..." />
<marker date="1519453840691" expanded="true" signature="86:2286" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1048:1458" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1275:1452" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1537:2284" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="1682:2278" ph="{...}" />
<marker date="1519453840691" expanded="true" signature="2205:2268" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="397">
<caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="28" />
<folding>
<marker date="1519454647412" expanded="false" signature="6:44" ph="..." />
<marker date="1519454647412" expanded="true" signature="138:2030" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="536:601" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="616:926" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="871:920" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="942:1131" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1015:1128" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1102:1124" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1176:1470" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1513:1719" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1550:1716" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1558:1674" ph="/* If the bird hits the trigger collider in between the columns then ... */" />
<marker date="1519454647412" expanded="true" signature="1740:2028" ph="{...}" />
<marker date="1519454647412" expanded="true" signature="1906:1983" ph="/* new Vector2(rb2d.velocity.x, 0); ... */" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1905">
<caret line="136" column="56" lean-forward="false" selection-start-line="136" selection-start-column="56" selection-end-line="136" selection-end-column="56" />
<folding>
<marker date="1519454701714" expanded="false" signature="6:279" ph="..." />
<marker date="1519454701714" expanded="true" signature="315:5213" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="343:3630" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="440:762" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="846:1243" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="1318:1460" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="1554:1943" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2032:2252" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2357:2648" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="2749:3131" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3243:3615" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3668:5209" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="3729:3970" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4079:4272" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4399:4752" ph="{...}" />
<marker date="1519454701714" expanded="true" signature="4867:5203" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......@@ -56,19 +56,19 @@ public class Bird : MonoBehaviour
anim.SetTrigger("Die");
//...and tell the game control about it.
if (GameControl.instance != null)
{
GameControl.instance.BirdDied();
}
GameControl.Instance.BirdDied();
}
void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Column"))
{
//If the bird hits the trigger collider in between the columns then
//tell the game control that the bird scored.
GameControl.instance.BirdScored();
GameControl.Instance.BirdScored();
}
}
public void Jump()
......
......@@ -38,7 +38,7 @@ public class ColumnPool : MonoBehaviour
{
timeSinceLastSpawned += Time.deltaTime;
if (GameControl.instance.gameOver == false && timeSinceLastSpawned >= spawnRate)
if (GameControl.Instance.gameOver == false && timeSinceLastSpawned >= spawnRate)
{
timeSinceLastSpawned = 0f;
......
......@@ -6,7 +6,7 @@ using UnityEngine.SceneManagement;
public class GameControl : MonoBehaviour
{
public static GameControl instance; //A reference to our game control script so we can access it statically.
private static GameControl instance; //A reference to our game control script so we can access it statically.
public Text scoreText; //A reference to the UI text component that displays the player's score.
public GameObject gameOvertext; //A reference to the object that displays the text which appears when the player dies.
......@@ -15,16 +15,26 @@ public class GameControl : MonoBehaviour
public float scrollSpeed = -1.5f;
void Awake()
public static GameControl Instance
{
//If we don't currently have a game control...
get
{
if (instance != null)
{
return instance;
}
else
{
instance = FindObjectOfType<GameControl>();
if (instance == null)
//...set this one to be it...
instance = this;
//...otherwise...
else if(instance != this)
//...destroy this one because it is a duplicate.
Destroy (gameObject);
{
instance = new GameObject().AddComponent<GameControl>();
}
}
return instance;
}
}
void Update()
......@@ -54,9 +64,20 @@ public class GameControl : MonoBehaviour
public void BirdDied()
{
if (gameOvertext != null)
{
//Activate the game over text.
gameOvertext.SetActive (true);
gameOvertext.SetActive(true);
}
//Set the game to be over.
gameOver = true;
}
public void Reset()
{
gameOver = false;
score = 0;
}
}
\ No newline at end of file
......
......@@ -17,7 +17,7 @@ public class ScrollingObject : MonoBehaviour
rb2d.bodyType = RigidbodyType2D.Kinematic;
//Start the object moving.
rb2d.velocity = new Vector2 (GameControl.instance.scrollSpeed, 0);
rb2d.velocity = new Vector2 (GameControl.Instance.scrollSpeed, 0);
}
......@@ -25,13 +25,13 @@ public class ScrollingObject : MonoBehaviour
void Update()
{
// If the game is over, stop scrolling.
if(GameControl.instance.gameOver == true)
if(GameControl.Instance.gameOver == true)
{
rb2d.velocity = Vector2.zero;
}
else
{
rb2d.velocity = new Vector2 (GameControl.instance.scrollSpeed, 0);
rb2d.velocity = new Vector2 (GameControl.Instance.scrollSpeed, 0);
}
}
}
\ No newline at end of file
......
......@@ -29,6 +29,8 @@ namespace FlappyBird.PlayModeTest
bird = instance.AddComponent<Bird>();
bird.upForce = 500f;
GameControl.Instance.Reset();
}
[UnityTest]
......@@ -58,6 +60,7 @@ namespace FlappyBird.PlayModeTest
}
[UnityTest]
public IEnumerator _Down_Fire1_Button_to_Bird_Jump_Up()
{
......@@ -77,12 +80,9 @@ namespace FlappyBird.PlayModeTest
[UnityTest]
public IEnumerator _Down_Fire1_Button_to_Bird_Speed_Not_Negative()
public IEnumerator _Bird_Jump_to_Bird_Speed_Not_Negative()
{
var unityInput = Substitute.For<IUnityInputService>();
unityInput.GetButtonDown("Fire1").Returns(true);
bird.UnityInput = unityInput;
bird.Jump();
yield return null;
......@@ -93,14 +93,13 @@ namespace FlappyBird.PlayModeTest
[UnityTest]
public IEnumerator _Down_Fire1_After_2sec_to_Bird_Y_Speed_Not_Negative()
public IEnumerator _Jump_After_2sec_to_Bird_Y_Speed_Not_Negative()
{
yield return new WaitForSeconds(2.0f);
var unityInput = Substitute.For<IUnityInputService>();
unityInput.GetButtonDown("Fire1").Returns(true);
bird.UnityInput = unityInput;
bird.Jump();
yield return null;
......@@ -113,11 +112,8 @@ namespace FlappyBird.PlayModeTest
[UnityTest]
public IEnumerator _Bird_Trigger_Collide_With_Column_Tag_to_Add_Score()
{
var gameContorl = new GameObject().AddComponent<GameControl>();
yield return null;
var score = gameContorl.score;
var score = GameControl.Instance.score;
var collider = new GameObject().AddComponent<BoxCollider2D>();
collider.tag = "Column";
......@@ -126,52 +122,47 @@ namespace FlappyBird.PlayModeTest
yield return null;
Assert.Greater(gameContorl.score,score);
Assert.AreEqual(score + 1,GameControl.Instance.score);
}
[UnityTest]
public IEnumerator _Bird_Trigger_Collide_With_Not_Column_Tag_to_Not_Change_Score()
{
var gameContorl = new GameObject().AddComponent<GameControl>();
var score = GameControl.Instance.score;
yield return null;
var collider = new GameObject().AddComponent<BoxCollider2D>();
var score = gameContorl.score;
yield return null;
bird.SendMessage("OnTriggerEnter2D",new Collider2D());
bird.SendMessage("OnTriggerEnter2D",collider);
yield return null;
Assert.AreEqual(gameContorl.score,score);
Assert.AreEqual(GameControl.Instance.score,score);
}
}
public class GameControlTest
{
private GameControl gameControl;
[SetUp]
public void BeforeEveryTest()
{
if (GameControl.instance != null)
{
GameObject.Destroy(GameControl.instance.gameObject);
}
gameControl = new GameObject("GameControl").AddComponent<GameControl>();
gameControl.scoreText = new GameObject().AddComponent<Text>();
gameControl.gameOvertext = new GameObject();
GameControl.Instance.scoreText = new GameObject("Score Text").AddComponent<Text>();
GameControl.Instance.gameOvertext = new GameObject("Game Over Text");
GameControl.Instance.Reset();
}
[Test]
public void _Bird_Scored_then_Displayd_Text_Contain_Updated_Score()
{
gameControl.BirdScored();
Assert.IsTrue(gameControl.scoreText.text.Contains(gameControl.score.ToString()));
GameControl.Instance.BirdScored();
Assert.IsTrue(GameControl.Instance.scoreText.text.Contains(GameControl.Instance.score.ToString()));
}
[UnityTest]
......@@ -179,7 +170,7 @@ namespace FlappyBird.PlayModeTest
{
var scrollingObject = new GameObject().AddComponent<ScrollingObject>();
gameControl.scrollSpeed = 0f;
GameControl.Instance.scrollSpeed = 0f;
yield return null;
yield return new WaitForFixedUpdate();
......@@ -192,15 +183,13 @@ namespace FlappyBird.PlayModeTest
{
var scrollingObject = new GameObject().AddComponent<ScrollingObject>();
gameControl.gameOver = true;
GameControl.Instance.gameOver = true;
yield return null;
yield return new WaitForFixedUpdate();
Assert.AreEqual(Vector2.zero, scrollingObject.GetComponent<Rigidbody2D>().velocity);
}
}
......