Nextrek
Diff Revisions
127
vs
130
for /3DSpace/Assets/Custum/Scripts/CommunicationCenter.cs
|
@@ -123,8 +123,8 @@ |
123 |
123 |
|
if(smallCameraShowTime<0) |
124 |
124 |
|
{ |
125 |
125 |
|
ShowSmallCamera(false); |
126 |
|
- |
CommunicationCenter.Instance.ShowSmallCamera1(false); |
127 |
|
- |
CommunicationCenter.Instance.ShowSmallCamera2(false); |
|
126 |
+ |
ShowSmallCamera1(false); |
|
127 |
+ |
ShowSmallCamera2(false); |
128 |
128 |
|
} |
129 |
129 |
|
if(!finished) |
130 |
130 |
|
{ |
|
@@ -134,36 +134,25 @@ |
134 |
134 |
|
|
135 |
135 |
|
public void DestroyOneEnemy(GameObject enemy) |
136 |
136 |
|
{ |
137 |
|
- |
ShowSmallCamera(true); |
138 |
|
- |
|
139 |
|
- |
PilotNameGenerator cmp = enemy.GetComponent<PilotNameGenerator>(); |
140 |
|
- |
if (cmp != null) |
141 |
|
- |
{ |
142 |
|
- |
MessageWindow.Instance.NewMessage(cmp.getPilotName() + " enemy's ship has been destroyed!"); |
143 |
|
- |
} |
144 |
137 |
|
EnemyPool.Instance.DestroyOneEnemy(enemy); |
|
138 |
+ |
ShowSmallCamera(true); |
|
139 |
+ |
MessageWindow.Instance.NewMessage("An enemy ship has been destroyed!"); |
145 |
140 |
|
haveToKill--; |
146 |
141 |
|
} |
147 |
142 |
|
|
148 |
143 |
|
public void DestroyOneAlly(GameObject ally) |
149 |
144 |
|
{ |
|
145 |
+ |
AllyPool.Instance.DestroyOneAlly(ally); |
150 |
146 |
|
ShowSmallCamera1(true); |
151 |
|
- |
|
152 |
|
- |
//AllyPool.Instance.DestroyOneAlly(ally); |
153 |
147 |
|
MessageWindow.Instance.NewMessage("An ally ship has been destroyed!"); |
154 |
|
- |
//haveToKill--; |
|
148 |
+ |
haveToKill--; |
155 |
149 |
|
} |
156 |
150 |
|
|
157 |
151 |
|
public void AllyDestroyOneEnemy(GameObject enemy) |
158 |
152 |
|
{ |
159 |
|
- |
ShowSmallCamera(true); |
160 |
|
- |
PilotNameGenerator cmp = enemy.GetComponent<PilotNameGenerator>(); |
161 |
|
- |
if (cmp != null) |
162 |
|
- |
{ |
163 |
|
- |
MessageWindow.Instance.NewMessage(cmp.getPilotName() + " enemy's ship has been destroyed by an ally!"); |
164 |
|
- |
} |
165 |
|
- |
|
166 |
153 |
|
EnemyPool.Instance.DestroyOneEnemy(enemy); |
|
154 |
+ |
ShowSmallCamera(true); |
|
155 |
+ |
MessageWindow.Instance.NewMessage("An ally destroyed one enemy ship!"); |
167 |
156 |
|
haveToKill--; |
168 |
157 |
|
} |
169 |
158 |
|
|
|
@@ -207,12 +196,11 @@ |
207 |
196 |
|
{ |
208 |
197 |
|
if (!EnemyPool.Instance) return; |
209 |
198 |
|
|
210 |
|
- |
if(EnemyPool.Instance.getRemainingEnemiesToKill() == 0) |
|
199 |
+ |
if(EnemyPool.Instance.aliveEnemy<=0) |
211 |
200 |
|
{ |
212 |
201 |
|
WinGame(); |
213 |
202 |
|
return; |
214 |
203 |
|
} |
215 |
|
- |
|
216 |
204 |
|
if(timeLimit==TimeLimit.RESIST && timeWindow.timeToShow<=0 && haveToKill<=0) |
217 |
205 |
|
{ |
218 |
206 |
|
WinGame(); |