I_Jemin

Refact

1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="ContentModelStore">
4 + <e p="$PROJECT_DIR$" t="IncludeRecursive">
5 + <e p="Assembly-CSharp-Editor-firstpass.csproj" t="IncludeRecursive" />
6 + <e p="Assembly-CSharp.csproj" t="IncludeRecursive" />
7 + <e p="Assets" t="Include">
8 + <e p="Plugins" t="Include">
9 + <e p="Editor" t="Include">
10 + <e p="JetBrains" t="Include">
11 + <e p="Unity3DRider.cs" t="Include" />
12 + </e>
13 + </e>
14 + </e>
15 + <e p="Scripts" t="Include">
16 + <e p="Bird.cs" t="Include" />
17 + <e p="Column.cs" t="Include" />
18 + <e p="ColumnPool.cs" t="Include" />
19 + <e p="GameControl.cs" t="Include" />
20 + <e p="IUnityInput.cs" t="Include" />
21 + <e p="RepeatingBackground.cs" t="Include" />
22 + <e p="ScrollingObject.cs" t="Include" />
23 + </e>
24 + <e p="Test Scripts" t="Include">
25 + <e p="BirdTest.cs" t="Include" />
26 + </e>
27 + </e>
28 + <e p="Bird-TDD.sln" t="IncludeFlat" />
29 + <e p="Library" t="ExcludeRecursive" />
30 + <e p="obj" t="ExcludeRecursive" />
31 + <e p="packages" t="ExcludeRecursive" />
32 + <e p="Temp" t="ExcludeRecursive">
33 + <e p="bin" t="ExcludeRecursive" />
34 + </e>
35 + </e>
36 + <e p="$USER_HOME$/Library/Caches/Rider2017.3/resharper-host/local/Transient/ReSharperHost/v11/SolutionCaches/_Bird-TDD.-1979534893.00" t="ExcludeRecursive" />
37 + </component>
38 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="ContentModelUserStore">
4 + <explicitIncludes />
5 + <explicitExcludes />
6 + </component>
7 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="ProjectModuleManager">
4 + <modules>
5 + <module fileurl="file://$PROJECT_DIR$/.idea/.idea.Bird-TDD/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Bird-TDD/riderModule.iml" />
6 + </modules>
7 + </component>
8 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="VcsDirectoryMappings">
4 + <mapping directory="$PROJECT_DIR$" vcs="Git" />
5 + </component>
6 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="ChangeListManager">
4 + <list default="true" id="ed0f3816-f0b0-4fd8-83c6-3ab16fe8493e" name="Default" comment="">
5 + <change beforePath="$PROJECT_DIR$/Assets/Scripts/Bird.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/Bird.cs" />
6 + <change beforePath="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" />
7 + <change beforePath="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" />
8 + <change beforePath="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" afterPath="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" />
9 + <change beforePath="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" afterPath="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" />
10 + </list>
11 + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
12 + <option name="TRACKING_ENABLED" value="true" />
13 + <option name="SHOW_DIALOG" value="false" />
14 + <option name="HIGHLIGHT_CONFLICTS" value="true" />
15 + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
16 + <option name="LAST_RESOLUTION" value="IGNORE" />
17 + </component>
18 + <component name="FileEditorManager">
19 + <leaf>
20 + <file leaf-file-name="BirdTest.cs" pinned="false" current-in-tab="true">
21 + <entry file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs">
22 + <provider selected="true" editor-type-id="text-editor">
23 + <state relative-caret-position="1905">
24 + <caret line="136" column="56" lean-forward="false" selection-start-line="136" selection-start-column="56" selection-end-line="136" selection-end-column="56" />
25 + <folding>
26 + <marker date="1519454701714" expanded="false" signature="6:279" ph="..." />
27 + <marker date="1519454701714" expanded="true" signature="315:5213" ph="{...}" />
28 + <marker date="1519454701714" expanded="true" signature="343:3630" ph="{...}" />
29 + <marker date="1519454701714" expanded="true" signature="440:762" ph="{...}" />
30 + <marker date="1519454701714" expanded="true" signature="846:1243" ph="{...}" />
31 + <marker date="1519454701714" expanded="true" signature="1318:1460" ph="{...}" />
32 + <marker date="1519454701714" expanded="true" signature="1554:1943" ph="{...}" />
33 + <marker date="1519454701714" expanded="true" signature="2032:2252" ph="{...}" />
34 + <marker date="1519454701714" expanded="true" signature="2357:2648" ph="{...}" />
35 + <marker date="1519454701714" expanded="true" signature="2749:3131" ph="{...}" />
36 + <marker date="1519454701714" expanded="true" signature="3243:3615" ph="{...}" />
37 + <marker date="1519454701714" expanded="true" signature="3668:5209" ph="{...}" />
38 + <marker date="1519454701714" expanded="true" signature="3729:3970" ph="{...}" />
39 + <marker date="1519454701714" expanded="true" signature="4079:4272" ph="{...}" />
40 + <marker date="1519454701714" expanded="true" signature="4399:4752" ph="{...}" />
41 + <marker date="1519454701714" expanded="true" signature="4867:5203" ph="{...}" />
42 + </folding>
43 + </state>
44 + </provider>
45 + </entry>
46 + </file>
47 + <file leaf-file-name="Bird.cs" pinned="false" current-in-tab="false">
48 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs">
49 + <provider selected="true" editor-type-id="text-editor">
50 + <state relative-caret-position="397">
51 + <caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="28" />
52 + <folding>
53 + <marker date="1519454647412" expanded="false" signature="6:44" ph="..." />
54 + <marker date="1519454647412" expanded="true" signature="138:2030" ph="{...}" />
55 + <marker date="1519454647412" expanded="true" signature="536:601" ph="{...}" />
56 + <marker date="1519454647412" expanded="true" signature="616:926" ph="{...}" />
57 + <marker date="1519454647412" expanded="true" signature="871:920" ph="{...}" />
58 + <marker date="1519454647412" expanded="true" signature="942:1131" ph="{...}" />
59 + <marker date="1519454647412" expanded="true" signature="1015:1128" ph="{...}" />
60 + <marker date="1519454647412" expanded="true" signature="1102:1124" ph="{...}" />
61 + <marker date="1519454647412" expanded="true" signature="1176:1470" ph="{...}" />
62 + <marker date="1519454647412" expanded="true" signature="1513:1719" ph="{...}" />
63 + <marker date="1519454647412" expanded="true" signature="1550:1716" ph="{...}" />
64 + <marker date="1519454647412" expanded="true" signature="1558:1674" ph="/* If the bird hits the trigger collider in between the columns then ... */" />
65 + <marker date="1519454647412" expanded="true" signature="1740:2028" ph="{...}" />
66 + <marker date="1519454647412" expanded="true" signature="1906:1983" ph="/* new Vector2(rb2d.velocity.x, 0); ... */" />
67 + </folding>
68 + </state>
69 + </provider>
70 + </entry>
71 + </file>
72 + <file leaf-file-name="ColumnPool.cs" pinned="false" current-in-tab="false">
73 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs">
74 + <provider selected="true" editor-type-id="text-editor">
75 + <state relative-caret-position="382">
76 + <caret line="40" column="32" lean-forward="false" selection-start-line="40" selection-start-column="32" selection-end-line="40" selection-end-column="32" />
77 + <folding>
78 + <marker date="1519453840691" expanded="false" signature="6:44" ph="..." />
79 + <marker date="1519453840691" expanded="true" signature="86:2286" ph="{...}" />
80 + <marker date="1519453840691" expanded="true" signature="1048:1458" ph="{...}" />
81 + <marker date="1519453840691" expanded="true" signature="1275:1452" ph="{...}" />
82 + <marker date="1519453840691" expanded="true" signature="1537:2284" ph="{...}" />
83 + <marker date="1519453840691" expanded="true" signature="1682:2278" ph="{...}" />
84 + <marker date="1519453840691" expanded="true" signature="2205:2268" ph="{...}" />
85 + </folding>
86 + </state>
87 + </provider>
88 + </entry>
89 + </file>
90 + <file leaf-file-name="IUnityInput.cs" pinned="false" current-in-tab="false">
91 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs">
92 + <provider selected="true" editor-type-id="text-editor">
93 + <state relative-caret-position="0">
94 + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
95 + <folding>
96 + <marker date="1519401611906" expanded="true" signature="55:102" ph="{...}" />
97 + <marker date="1519401611906" expanded="true" signature="155:273" ph="{...}" />
98 + <marker date="1519401611906" expanded="true" signature="206:266" ph="{...}" />
99 + </folding>
100 + </state>
101 + </provider>
102 + </entry>
103 + </file>
104 + <file leaf-file-name="GameControl.cs" pinned="false" current-in-tab="false">
105 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs">
106 + <provider selected="true" editor-type-id="text-editor">
107 + <state relative-caret-position="179">
108 + <caret line="53" column="19" lean-forward="false" selection-start-line="53" selection-start-column="19" selection-end-line="53" selection-end-column="19" />
109 + <folding>
110 + <marker date="1519454376673" expanded="false" signature="6:123" ph="..." />
111 + <marker date="1519454376673" expanded="true" signature="165:1725" ph="{...}" />
112 + <marker date="1519454376673" expanded="true" signature="682:946" ph="{...}" />
113 + <marker date="1519454376673" expanded="true" signature="691:943" ph="{...}" />
114 + <marker date="1519454376673" expanded="true" signature="720:751" ph="{...}" />
115 + <marker date="1519454376673" expanded="true" signature="759:918" ph="{...}" />
116 + <marker date="1519454376673" expanded="true" signature="839:913" ph="{...}" />
117 + <marker date="1519454376673" expanded="true" signature="962:1191" ph="{...}" />
118 + <marker date="1519454376673" expanded="true" signature="1077:1188" ph="{...}" />
119 + <marker date="1519454376673" expanded="true" signature="1218:1478" ph="{...}" />
120 + <marker date="1519454376673" expanded="true" signature="1382:1475" ph="{...}" />
121 + <marker date="1519454376673" expanded="true" signature="1503:1661" ph="{...}" />
122 + <marker date="1519454376673" expanded="true" signature="1534:1609" ph="{...}" />
123 + <marker date="1519454376673" expanded="true" signature="1683:1722" ph="{...}" />
124 + </folding>
125 + </state>
126 + </provider>
127 + </entry>
128 + </file>
129 + <file leaf-file-name="RepeatingBackground.cs" pinned="false" current-in-tab="false">
130 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs">
131 + <provider selected="true" editor-type-id="text-editor">
132 + <state relative-caret-position="0">
133 + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
134 + <folding>
135 + <marker date="1519397133348" expanded="false" signature="6:44" ph="..." />
136 + <marker date="1519397133348" expanded="true" signature="95:1674" ph="{...}" />
137 + <marker date="1519397133348" expanded="true" signature="405:655" ph="{...}" />
138 + <marker date="1519397133348" expanded="true" signature="709:1072" ph="{...}" />
139 + <marker date="1519397133348" expanded="true" signature="926:1069" ph="{...}" />
140 + <marker date="1519397133348" expanded="true" signature="1213:1672" ph="{...}" />
141 + </folding>
142 + </state>
143 + </provider>
144 + </entry>
145 + </file>
146 + <file leaf-file-name="ScrollingObject.cs" pinned="false" current-in-tab="false">
147 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs">
148 + <provider selected="true" editor-type-id="text-editor">
149 + <state relative-caret-position="120">
150 + <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
151 + <folding>
152 + <marker date="1519453849709" expanded="false" signature="6:78" ph="..." />
153 + <marker date="1519453849709" expanded="true" signature="165:756" ph="{...}" />
154 + <marker date="1519453849709" expanded="true" signature="242:520" ph="{...}" />
155 + <marker date="1519453849709" expanded="true" signature="536:754" ph="{...}" />
156 + <marker date="1519453849709" expanded="true" signature="625:666" ph="{...}" />
157 + <marker date="1519453849709" expanded="true" signature="673:751" ph="{...}" />
158 + </folding>
159 + </state>
160 + </provider>
161 + </entry>
162 + </file>
163 + </leaf>
164 + </component>
165 + <component name="FindInProjectRecents">
166 + <findStrings>
167 + <find>gameOvertext</find>
168 + <find>OnCollisionEnter2D</find>
169 + <find>score</find>
170 + <find>Instance</find>
171 + </findStrings>
172 + </component>
173 + <component name="Git.Settings">
174 + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
175 + </component>
176 + <component name="HighlightingSettingsPerFile">
177 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs" root0="FORCE_HIGHLIGHTING" />
178 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" root0="FORCE_HIGHLIGHTING" />
179 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs" root0="FORCE_HIGHLIGHTING" />
180 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs" root0="FORCE_HIGHLIGHTING" />
181 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" root0="FORCE_HIGHLIGHTING" />
182 + <setting file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" root0="FORCE_HIGHLIGHTING" />
183 + <setting file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs" root0="FORCE_HIGHLIGHTING" />
184 + </component>
185 + <component name="IdeDocumentHistory">
186 + <option name="CHANGED_PATHS">
187 + <list>
188 + <option value="$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs" />
189 + <option value="$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs" />
190 + <option value="$PROJECT_DIR$/Assets/Scripts/GameControl.cs" />
191 + <option value="$PROJECT_DIR$/Assets/Scripts/Bird.cs" />
192 + <option value="$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs" />
193 + </list>
194 + </option>
195 + </component>
196 + <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
197 + <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
198 + <component name="JsGulpfileManager">
199 + <detection-done>true</detection-done>
200 + <sorting>DEFINITION_ORDER</sorting>
201 + </component>
202 + <component name="ProjectFrameBounds">
203 + <option name="x" value="-1" />
204 + <option name="y" value="23" />
205 + <option name="width" value="1440" />
206 + <option name="height" value="877" />
207 + </component>
208 + <component name="ProjectView">
209 + <navigator currentView="SolutionExplorer" proportions="" version="1">
210 + <flattenPackages />
211 + <showMembers />
212 + <showModules />
213 + <showLibraryContents />
214 + <hideEmptyPackages />
215 + <abbreviatePackageNames />
216 + <autoscrollToSource />
217 + <autoscrollFromSource />
218 + <sortByType />
219 + <manualOrder />
220 + <foldersAlwaysOnTop value="true" />
221 + </navigator>
222 + <panes>
223 + <pane id="Scratches" />
224 + <pane id="SolutionExplorer">
225 + <subPane>
226 + <expand>
227 + <path>
228 + <item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
229 + <item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
230 + </path>
231 + <path>
232 + <item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
233 + <item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
234 + <item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
235 + </path>
236 + <path>
237 + <item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
238 + <item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
239 + <item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
240 + <item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
241 + </path>
242 + <path>
243 + <item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
244 + <item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
245 + <item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
246 + <item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
247 + <item name="Scripts" type="977d5f41:SolutionExplorerNodeRider" />
248 + </path>
249 + <path>
250 + <item name="" type="13324e5d:SolutionExplorerViewPane$ProjectViewPaneTreeStructure$createRoot$1" />
251 + <item name="Bird-TDD (2 projects)" type="977d5f41:SolutionExplorerNodeRider" />
252 + <item name="Assembly-CSharp" type="977d5f41:SolutionExplorerNodeRider" />
253 + <item name="Assets" type="977d5f41:SolutionExplorerNodeRider" />
254 + <item name="Test Scripts" type="977d5f41:SolutionExplorerNodeRider" />
255 + </path>
256 + </expand>
257 + <select />
258 + </subPane>
259 + <option name="show-file-system" value="false" />
260 + <option name="show-all-items" value="false" />
261 + </pane>
262 + </panes>
263 + </component>
264 + <component name="PropertiesComponent">
265 + <property name="WebServerToolWindowFactoryState" value="false" />
266 + </component>
267 + <component name="RunDashboard">
268 + <option name="ruleStates">
269 + <list>
270 + <RuleState>
271 + <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
272 + </RuleState>
273 + <RuleState>
274 + <option name="name" value="StatusDashboardGroupingRule" />
275 + </RuleState>
276 + </list>
277 + </option>
278 + </component>
279 + <component name="RunManager">
280 + <configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" />
281 + </component>
282 + <component name="ShelveChangesManager" show_recycled="false">
283 + <option name="remove_strategy" value="false" />
284 + </component>
285 + <component name="SvnConfiguration">
286 + <configuration />
287 + </component>
288 + <component name="TaskManager">
289 + <task active="true" id="Default" summary="Default task">
290 + <changelist id="ed0f3816-f0b0-4fd8-83c6-3ab16fe8493e" name="Default" comment="" />
291 + <created>1519453143118</created>
292 + <option name="number" value="Default" />
293 + <option name="presentableId" value="Default" />
294 + <updated>1519453143118</updated>
295 + <workItem from="1519453146473" duration="1701000" />
296 + </task>
297 + <servers />
298 + </component>
299 + <component name="TimeTrackingManager">
300 + <option name="totallyTimeSpent" value="1701000" />
301 + </component>
302 + <component name="TodoView">
303 + <todo-panel id="selected-file">
304 + <is-autoscroll-to-source value="true" />
305 + </todo-panel>
306 + <todo-panel id="all">
307 + <are-packages-shown value="true" />
308 + <is-autoscroll-to-source value="true" />
309 + </todo-panel>
310 + </component>
311 + <component name="ToolWindowManager">
312 + <frame x="-1" y="23" width="1440" height="877" extended-state="6" />
313 + <layout>
314 + <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" />
315 + <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" />
316 + <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" />
317 + <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" />
318 + <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" />
319 + <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" />
320 + <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" />
321 + <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" />
322 + <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" />
323 + <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" />
324 + <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" />
325 + <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" />
326 + <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" />
327 + <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" />
328 + <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" />
329 + <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" />
330 + <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" />
331 + <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" />
332 + <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" />
333 + <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" />
334 + <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" />
335 + </layout>
336 + </component>
337 + <component name="TypeScriptGeneratedFilesManager">
338 + <option name="version" value="1" />
339 + </component>
340 + <component name="VcsContentAnnotationSettings">
341 + <option name="myLimit" value="2678400000" />
342 + </component>
343 + <component name="XDebuggerManager">
344 + <breakpoint-manager />
345 + <watches-manager />
346 + </component>
347 + <component name="editorHistoryManager">
348 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/IUnityInput.cs">
349 + <provider selected="true" editor-type-id="text-editor">
350 + <state relative-caret-position="0">
351 + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
352 + <folding>
353 + <marker date="1519401611906" expanded="true" signature="55:102" ph="{...}" />
354 + <marker date="1519401611906" expanded="true" signature="155:273" ph="{...}" />
355 + <marker date="1519401611906" expanded="true" signature="206:266" ph="{...}" />
356 + </folding>
357 + </state>
358 + </provider>
359 + </entry>
360 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/ScrollingObject.cs">
361 + <provider selected="true" editor-type-id="text-editor">
362 + <state relative-caret-position="120">
363 + <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
364 + <folding>
365 + <marker date="1519453849709" expanded="false" signature="6:78" ph="..." />
366 + <marker date="1519453849709" expanded="true" signature="165:756" ph="{...}" />
367 + <marker date="1519453849709" expanded="true" signature="242:520" ph="{...}" />
368 + <marker date="1519453849709" expanded="true" signature="536:754" ph="{...}" />
369 + <marker date="1519453849709" expanded="true" signature="625:666" ph="{...}" />
370 + <marker date="1519453849709" expanded="true" signature="673:751" ph="{...}" />
371 + </folding>
372 + </state>
373 + </provider>
374 + </entry>
375 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/RepeatingBackground.cs">
376 + <provider selected="true" editor-type-id="text-editor">
377 + <state relative-caret-position="0">
378 + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
379 + <folding>
380 + <marker date="1519397133348" expanded="false" signature="6:44" ph="..." />
381 + <marker date="1519397133348" expanded="true" signature="95:1674" ph="{...}" />
382 + <marker date="1519397133348" expanded="true" signature="405:655" ph="{...}" />
383 + <marker date="1519397133348" expanded="true" signature="709:1072" ph="{...}" />
384 + <marker date="1519397133348" expanded="true" signature="926:1069" ph="{...}" />
385 + <marker date="1519397133348" expanded="true" signature="1213:1672" ph="{...}" />
386 + </folding>
387 + </state>
388 + </provider>
389 + </entry>
390 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/GameControl.cs">
391 + <provider selected="true" editor-type-id="text-editor">
392 + <state relative-caret-position="179">
393 + <caret line="53" column="19" lean-forward="false" selection-start-line="53" selection-start-column="19" selection-end-line="53" selection-end-column="19" />
394 + <folding>
395 + <marker date="1519454376673" expanded="false" signature="6:123" ph="..." />
396 + <marker date="1519454376673" expanded="true" signature="165:1725" ph="{...}" />
397 + <marker date="1519454376673" expanded="true" signature="682:946" ph="{...}" />
398 + <marker date="1519454376673" expanded="true" signature="691:943" ph="{...}" />
399 + <marker date="1519454376673" expanded="true" signature="720:751" ph="{...}" />
400 + <marker date="1519454376673" expanded="true" signature="759:918" ph="{...}" />
401 + <marker date="1519454376673" expanded="true" signature="839:913" ph="{...}" />
402 + <marker date="1519454376673" expanded="true" signature="962:1191" ph="{...}" />
403 + <marker date="1519454376673" expanded="true" signature="1077:1188" ph="{...}" />
404 + <marker date="1519454376673" expanded="true" signature="1218:1478" ph="{...}" />
405 + <marker date="1519454376673" expanded="true" signature="1382:1475" ph="{...}" />
406 + <marker date="1519454376673" expanded="true" signature="1503:1661" ph="{...}" />
407 + <marker date="1519454376673" expanded="true" signature="1534:1609" ph="{...}" />
408 + <marker date="1519454376673" expanded="true" signature="1683:1722" ph="{...}" />
409 + </folding>
410 + </state>
411 + </provider>
412 + </entry>
413 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/ColumnPool.cs">
414 + <provider selected="true" editor-type-id="text-editor">
415 + <state relative-caret-position="382">
416 + <caret line="40" column="32" lean-forward="false" selection-start-line="40" selection-start-column="32" selection-end-line="40" selection-end-column="32" />
417 + <folding>
418 + <marker date="1519453840691" expanded="false" signature="6:44" ph="..." />
419 + <marker date="1519453840691" expanded="true" signature="86:2286" ph="{...}" />
420 + <marker date="1519453840691" expanded="true" signature="1048:1458" ph="{...}" />
421 + <marker date="1519453840691" expanded="true" signature="1275:1452" ph="{...}" />
422 + <marker date="1519453840691" expanded="true" signature="1537:2284" ph="{...}" />
423 + <marker date="1519453840691" expanded="true" signature="1682:2278" ph="{...}" />
424 + <marker date="1519453840691" expanded="true" signature="2205:2268" ph="{...}" />
425 + </folding>
426 + </state>
427 + </provider>
428 + </entry>
429 + <entry file="file://$PROJECT_DIR$/Assets/Scripts/Bird.cs">
430 + <provider selected="true" editor-type-id="text-editor">
431 + <state relative-caret-position="397">
432 + <caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="28" />
433 + <folding>
434 + <marker date="1519454647412" expanded="false" signature="6:44" ph="..." />
435 + <marker date="1519454647412" expanded="true" signature="138:2030" ph="{...}" />
436 + <marker date="1519454647412" expanded="true" signature="536:601" ph="{...}" />
437 + <marker date="1519454647412" expanded="true" signature="616:926" ph="{...}" />
438 + <marker date="1519454647412" expanded="true" signature="871:920" ph="{...}" />
439 + <marker date="1519454647412" expanded="true" signature="942:1131" ph="{...}" />
440 + <marker date="1519454647412" expanded="true" signature="1015:1128" ph="{...}" />
441 + <marker date="1519454647412" expanded="true" signature="1102:1124" ph="{...}" />
442 + <marker date="1519454647412" expanded="true" signature="1176:1470" ph="{...}" />
443 + <marker date="1519454647412" expanded="true" signature="1513:1719" ph="{...}" />
444 + <marker date="1519454647412" expanded="true" signature="1550:1716" ph="{...}" />
445 + <marker date="1519454647412" expanded="true" signature="1558:1674" ph="/* If the bird hits the trigger collider in between the columns then ... */" />
446 + <marker date="1519454647412" expanded="true" signature="1740:2028" ph="{...}" />
447 + <marker date="1519454647412" expanded="true" signature="1906:1983" ph="/* new Vector2(rb2d.velocity.x, 0); ... */" />
448 + </folding>
449 + </state>
450 + </provider>
451 + </entry>
452 + <entry file="file://$PROJECT_DIR$/Assets/Test Scripts/BirdTest.cs">
453 + <provider selected="true" editor-type-id="text-editor">
454 + <state relative-caret-position="1905">
455 + <caret line="136" column="56" lean-forward="false" selection-start-line="136" selection-start-column="56" selection-end-line="136" selection-end-column="56" />
456 + <folding>
457 + <marker date="1519454701714" expanded="false" signature="6:279" ph="..." />
458 + <marker date="1519454701714" expanded="true" signature="315:5213" ph="{...}" />
459 + <marker date="1519454701714" expanded="true" signature="343:3630" ph="{...}" />
460 + <marker date="1519454701714" expanded="true" signature="440:762" ph="{...}" />
461 + <marker date="1519454701714" expanded="true" signature="846:1243" ph="{...}" />
462 + <marker date="1519454701714" expanded="true" signature="1318:1460" ph="{...}" />
463 + <marker date="1519454701714" expanded="true" signature="1554:1943" ph="{...}" />
464 + <marker date="1519454701714" expanded="true" signature="2032:2252" ph="{...}" />
465 + <marker date="1519454701714" expanded="true" signature="2357:2648" ph="{...}" />
466 + <marker date="1519454701714" expanded="true" signature="2749:3131" ph="{...}" />
467 + <marker date="1519454701714" expanded="true" signature="3243:3615" ph="{...}" />
468 + <marker date="1519454701714" expanded="true" signature="3668:5209" ph="{...}" />
469 + <marker date="1519454701714" expanded="true" signature="3729:3970" ph="{...}" />
470 + <marker date="1519454701714" expanded="true" signature="4079:4272" ph="{...}" />
471 + <marker date="1519454701714" expanded="true" signature="4399:4752" ph="{...}" />
472 + <marker date="1519454701714" expanded="true" signature="4867:5203" ph="{...}" />
473 + </folding>
474 + </state>
475 + </provider>
476 + </entry>
477 + </component>
478 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<module type="RIDER_MODULE" version="4">
3 + <component name="NewModuleRootManager">
4 + <content url="file://$MODULE_DIR$/../.." />
5 + <orderEntry type="sourceFolder" forTests="false" />
6 + </component>
7 +</module>
...\ No newline at end of file ...\ No newline at end of file
...@@ -56,19 +56,19 @@ public class Bird : MonoBehaviour ...@@ -56,19 +56,19 @@ public class Bird : MonoBehaviour
56 anim.SetTrigger("Die"); 56 anim.SetTrigger("Die");
57 //...and tell the game control about it. 57 //...and tell the game control about it.
58 58
59 - if (GameControl.instance != null) 59 +
60 - { 60 + GameControl.Instance.BirdDied();
61 - GameControl.instance.BirdDied(); 61 +
62 - }
63 } 62 }
64 63
65 void OnTriggerEnter2D(Collider2D other) 64 void OnTriggerEnter2D(Collider2D other)
66 { 65 {
67 - 66 + if (other.CompareTag("Column"))
68 - //If the bird hits the trigger collider in between the columns then 67 + {
69 - //tell the game control that the bird scored. 68 + //If the bird hits the trigger collider in between the columns then
70 - GameControl.instance.BirdScored(); 69 + //tell the game control that the bird scored.
71 - 70 + GameControl.Instance.BirdScored();
71 + }
72 } 72 }
73 73
74 public void Jump() 74 public void Jump()
......
...@@ -38,7 +38,7 @@ public class ColumnPool : MonoBehaviour ...@@ -38,7 +38,7 @@ public class ColumnPool : MonoBehaviour
38 { 38 {
39 timeSinceLastSpawned += Time.deltaTime; 39 timeSinceLastSpawned += Time.deltaTime;
40 40
41 - if (GameControl.instance.gameOver == false && timeSinceLastSpawned >= spawnRate) 41 + if (GameControl.Instance.gameOver == false && timeSinceLastSpawned >= spawnRate)
42 { 42 {
43 timeSinceLastSpawned = 0f; 43 timeSinceLastSpawned = 0f;
44 44
......
...@@ -4,33 +4,43 @@ using UnityEngine.AI; ...@@ -4,33 +4,43 @@ using UnityEngine.AI;
4 using UnityEngine.UI; 4 using UnityEngine.UI;
5 using UnityEngine.SceneManagement; 5 using UnityEngine.SceneManagement;
6 6
7 -public class GameControl : MonoBehaviour 7 +public class GameControl : MonoBehaviour
8 { 8 {
9 - public static GameControl instance; //A reference to our game control script so we can access it statically. 9 + private static GameControl instance; //A reference to our game control script so we can access it statically.
10 - public Text scoreText; //A reference to the UI text component that displays the player's score. 10 + public Text scoreText; //A reference to the UI text component that displays the player's score.
11 - public GameObject gameOvertext; //A reference to the object that displays the text which appears when the player dies. 11 + public GameObject gameOvertext; //A reference to the object that displays the text which appears when the player dies.
12 12
13 - public int score { get; private set; } //The player's score. 13 + public int score { get; private set; } //The player's score.
14 - public bool gameOver = false; //Is the game over? 14 + public bool gameOver = false; //Is the game over?
15 public float scrollSpeed = -1.5f; 15 public float scrollSpeed = -1.5f;
16 16
17 17
18 - void Awake() 18 + public static GameControl Instance
19 { 19 {
20 - //If we don't currently have a game control... 20 + get
21 - if (instance == null) 21 + {
22 - //...set this one to be it... 22 + if (instance != null)
23 - instance = this; 23 + {
24 - //...otherwise... 24 + return instance;
25 - else if(instance != this) 25 + }
26 - //...destroy this one because it is a duplicate. 26 + else
27 - Destroy (gameObject); 27 + {
28 + instance = FindObjectOfType<GameControl>();
29 +
30 + if (instance == null)
31 + {
32 + instance = new GameObject().AddComponent<GameControl>();
33 + }
34 + }
35 +
36 + return instance;
37 + }
28 } 38 }
29 39
30 void Update() 40 void Update()
31 { 41 {
32 //If the game is over and the player has pressed some input... 42 //If the game is over and the player has pressed some input...
33 - if (gameOver && Input.GetMouseButtonDown(0)) 43 + if (gameOver && Input.GetMouseButtonDown(0))
34 { 44 {
35 //...reload the current scene. 45 //...reload the current scene.
36 SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); 46 SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
...@@ -54,9 +64,20 @@ public class GameControl : MonoBehaviour ...@@ -54,9 +64,20 @@ public class GameControl : MonoBehaviour
54 64
55 public void BirdDied() 65 public void BirdDied()
56 { 66 {
57 - //Activate the game over text. 67 + if (gameOvertext != null)
58 - gameOvertext.SetActive (true); 68 + {
69 + //Activate the game over text.
70 + gameOvertext.SetActive(true);
71 + }
72 +
59 //Set the game to be over. 73 //Set the game to be over.
60 gameOver = true; 74 gameOver = true;
61 } 75 }
76 +
77 + public void Reset()
78 + {
79 + gameOver = false;
80 + score = 0;
81 + }
82 +
62 } 83 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -17,7 +17,7 @@ public class ScrollingObject : MonoBehaviour ...@@ -17,7 +17,7 @@ public class ScrollingObject : MonoBehaviour
17 17
18 rb2d.bodyType = RigidbodyType2D.Kinematic; 18 rb2d.bodyType = RigidbodyType2D.Kinematic;
19 //Start the object moving. 19 //Start the object moving.
20 - rb2d.velocity = new Vector2 (GameControl.instance.scrollSpeed, 0); 20 + rb2d.velocity = new Vector2 (GameControl.Instance.scrollSpeed, 0);
21 21
22 22
23 } 23 }
...@@ -25,13 +25,13 @@ public class ScrollingObject : MonoBehaviour ...@@ -25,13 +25,13 @@ public class ScrollingObject : MonoBehaviour
25 void Update() 25 void Update()
26 { 26 {
27 // If the game is over, stop scrolling. 27 // If the game is over, stop scrolling.
28 - if(GameControl.instance.gameOver == true) 28 + if(GameControl.Instance.gameOver == true)
29 { 29 {
30 rb2d.velocity = Vector2.zero; 30 rb2d.velocity = Vector2.zero;
31 } 31 }
32 else 32 else
33 { 33 {
34 - rb2d.velocity = new Vector2 (GameControl.instance.scrollSpeed, 0); 34 + rb2d.velocity = new Vector2 (GameControl.Instance.scrollSpeed, 0);
35 } 35 }
36 } 36 }
37 } 37 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -29,6 +29,8 @@ namespace FlappyBird.PlayModeTest ...@@ -29,6 +29,8 @@ namespace FlappyBird.PlayModeTest
29 bird = instance.AddComponent<Bird>(); 29 bird = instance.AddComponent<Bird>();
30 30
31 bird.upForce = 500f; 31 bird.upForce = 500f;
32 +
33 + GameControl.Instance.Reset();
32 } 34 }
33 35
34 [UnityTest] 36 [UnityTest]
...@@ -57,6 +59,7 @@ namespace FlappyBird.PlayModeTest ...@@ -57,6 +59,7 @@ namespace FlappyBird.PlayModeTest
57 Assert.AreEqual(true, bird.IsDead); 59 Assert.AreEqual(true, bird.IsDead);
58 60
59 } 61 }
62 +
60 63
61 [UnityTest] 64 [UnityTest]
62 public IEnumerator _Down_Fire1_Button_to_Bird_Jump_Up() 65 public IEnumerator _Down_Fire1_Button_to_Bird_Jump_Up()
...@@ -77,12 +80,9 @@ namespace FlappyBird.PlayModeTest ...@@ -77,12 +80,9 @@ namespace FlappyBird.PlayModeTest
77 80
78 81
79 [UnityTest] 82 [UnityTest]
80 - public IEnumerator _Down_Fire1_Button_to_Bird_Speed_Not_Negative() 83 + public IEnumerator _Bird_Jump_to_Bird_Speed_Not_Negative()
81 { 84 {
82 - var unityInput = Substitute.For<IUnityInputService>(); 85 + bird.Jump();
83 - unityInput.GetButtonDown("Fire1").Returns(true);
84 -
85 - bird.UnityInput = unityInput;
86 86
87 yield return null; 87 yield return null;
88 88
...@@ -93,14 +93,13 @@ namespace FlappyBird.PlayModeTest ...@@ -93,14 +93,13 @@ namespace FlappyBird.PlayModeTest
93 93
94 94
95 [UnityTest] 95 [UnityTest]
96 - public IEnumerator _Down_Fire1_After_2sec_to_Bird_Y_Speed_Not_Negative() 96 + public IEnumerator _Jump_After_2sec_to_Bird_Y_Speed_Not_Negative()
97 { 97 {
98 98
99 99
100 yield return new WaitForSeconds(2.0f); 100 yield return new WaitForSeconds(2.0f);
101 - var unityInput = Substitute.For<IUnityInputService>(); 101 +
102 - unityInput.GetButtonDown("Fire1").Returns(true); 102 + bird.Jump();
103 - bird.UnityInput = unityInput;
104 103
105 yield return null; 104 yield return null;
106 105
...@@ -113,11 +112,8 @@ namespace FlappyBird.PlayModeTest ...@@ -113,11 +112,8 @@ namespace FlappyBird.PlayModeTest
113 [UnityTest] 112 [UnityTest]
114 public IEnumerator _Bird_Trigger_Collide_With_Column_Tag_to_Add_Score() 113 public IEnumerator _Bird_Trigger_Collide_With_Column_Tag_to_Add_Score()
115 { 114 {
116 - var gameContorl = new GameObject().AddComponent<GameControl>();
117 -
118 - yield return null;
119 115
120 - var score = gameContorl.score; 116 + var score = GameControl.Instance.score;
121 117
122 var collider = new GameObject().AddComponent<BoxCollider2D>(); 118 var collider = new GameObject().AddComponent<BoxCollider2D>();
123 collider.tag = "Column"; 119 collider.tag = "Column";
...@@ -126,52 +122,47 @@ namespace FlappyBird.PlayModeTest ...@@ -126,52 +122,47 @@ namespace FlappyBird.PlayModeTest
126 122
127 yield return null; 123 yield return null;
128 124
129 - Assert.Greater(gameContorl.score,score); 125 + Assert.AreEqual(score + 1,GameControl.Instance.score);
130 } 126 }
131 127
132 [UnityTest] 128 [UnityTest]
133 public IEnumerator _Bird_Trigger_Collide_With_Not_Column_Tag_to_Not_Change_Score() 129 public IEnumerator _Bird_Trigger_Collide_With_Not_Column_Tag_to_Not_Change_Score()
134 { 130 {
135 - var gameContorl = new GameObject().AddComponent<GameControl>(); 131 + var score = GameControl.Instance.score;
132 +
133 + var collider = new GameObject().AddComponent<BoxCollider2D>();
136 134
137 yield return null; 135 yield return null;
138 136
139 - var score = gameContorl.score; 137 + bird.SendMessage("OnTriggerEnter2D",collider);
140 -
141 - bird.SendMessage("OnTriggerEnter2D",new Collider2D());
142 138
143 yield return null; 139 yield return null;
144 140
145 - Assert.AreEqual(gameContorl.score,score); 141 + Assert.AreEqual(GameControl.Instance.score,score);
146 } 142 }
147 143
148 } 144 }
149 145
150 public class GameControlTest 146 public class GameControlTest
151 { 147 {
152 - private GameControl gameControl; 148 +
153 -
154 [SetUp] 149 [SetUp]
155 public void BeforeEveryTest() 150 public void BeforeEveryTest()
156 { 151 {
157 - if (GameControl.instance != null) 152 + GameControl.Instance.scoreText = new GameObject("Score Text").AddComponent<Text>();
158 - { 153 + GameControl.Instance.gameOvertext = new GameObject("Game Over Text");
159 - GameObject.Destroy(GameControl.instance.gameObject); 154 + GameControl.Instance.Reset();
160 - }
161 -
162 - gameControl = new GameObject("GameControl").AddComponent<GameControl>();
163 -
164 - gameControl.scoreText = new GameObject().AddComponent<Text>();
165 - gameControl.gameOvertext = new GameObject();
166 155
167 } 156 }
168 - 157 +
158 +
169 [Test] 159 [Test]
170 public void _Bird_Scored_then_Displayd_Text_Contain_Updated_Score() 160 public void _Bird_Scored_then_Displayd_Text_Contain_Updated_Score()
171 { 161 {
172 - gameControl.BirdScored(); 162 +
163 + GameControl.Instance.BirdScored();
173 164
174 - Assert.IsTrue(gameControl.scoreText.text.Contains(gameControl.score.ToString())); 165 + Assert.IsTrue(GameControl.Instance.scoreText.text.Contains(GameControl.Instance.score.ToString()));
175 } 166 }
176 167
177 [UnityTest] 168 [UnityTest]
...@@ -179,7 +170,7 @@ namespace FlappyBird.PlayModeTest ...@@ -179,7 +170,7 @@ namespace FlappyBird.PlayModeTest
179 { 170 {
180 var scrollingObject = new GameObject().AddComponent<ScrollingObject>(); 171 var scrollingObject = new GameObject().AddComponent<ScrollingObject>();
181 172
182 - gameControl.scrollSpeed = 0f; 173 + GameControl.Instance.scrollSpeed = 0f;
183 174
184 yield return null; 175 yield return null;
185 yield return new WaitForFixedUpdate(); 176 yield return new WaitForFixedUpdate();
...@@ -192,15 +183,13 @@ namespace FlappyBird.PlayModeTest ...@@ -192,15 +183,13 @@ namespace FlappyBird.PlayModeTest
192 { 183 {
193 var scrollingObject = new GameObject().AddComponent<ScrollingObject>(); 184 var scrollingObject = new GameObject().AddComponent<ScrollingObject>();
194 185
195 - gameControl.gameOver = true; 186 + GameControl.Instance.gameOver = true;
196 187
197 yield return null; 188 yield return null;
198 yield return new WaitForFixedUpdate(); 189 yield return new WaitForFixedUpdate();
199 190
200 Assert.AreEqual(Vector2.zero, scrollingObject.GetComponent<Rigidbody2D>().velocity); 191 Assert.AreEqual(Vector2.zero, scrollingObject.GetComponent<Rigidbody2D>().velocity);
201 } 192 }
202 -
203 -
204 } 193 }
205 194
206 195
......