1 #include "ScoreScreenProcesses.h"
2 #include "../../Actor/ActorTemplates.h"
3 #include "../../Actor/Actor.h"
4 #include "../../Actor/Components/PositionComponent.h"
5 #include "../../Actor/Components/RenderComponent.h"
6
7 //=================================================================================================
8 // DelayedProcess implementation
9 //=================================================================================================
10
DelayedProcess(int delay)11 DelayedProcess::DelayedProcess(int delay)
12 :
13 m_Delay(delay),
14 Process()
15 {
16
17 }
18
VOnUpdate(uint32 msDiff)19 void DelayedProcess::VOnUpdate(uint32 msDiff)
20 {
21 m_Delay -= msDiff;
22 if (m_Delay <= 0)
23 {
24 Succeed();
25 }
26 }
27
28
29 //=================================================================================================
30 // ImageSpawnProcess implementation
31 //=================================================================================================
32
ImageSpawnProcess(const std::string & imagePath,const Point & position,const AnimationDef & aniDef)33 ImageSpawnProcess::ImageSpawnProcess(const std::string& imagePath, const Point& position, const AnimationDef& aniDef)
34 :
35 m_ImagePath(imagePath),
36 m_Position(position),
37 m_AniDef(aniDef),
38 Process()
39 {
40
41 }
42
VOnUpdate(uint32 msDiff)43 void ImageSpawnProcess::VOnUpdate(uint32 msDiff)
44 {
45 SpawnImageActor(m_ImagePath, m_Position, m_AniDef);
46 Succeed();
47 }
48
49 //=================================================================================================
50 // PlaySoundProcess implementation
51 //=================================================================================================
52
PlaySoundProcess(const SoundInfo & sound)53 PlaySoundProcess::PlaySoundProcess(const SoundInfo& sound)
54 :
55 m_Sound(sound),
56 Process()
57 {
58 }
59
VOnUpdate(uint32 msDiff)60 void PlaySoundProcess::VOnUpdate(uint32 msDiff)
61 {
62 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Request_Play_Sound(m_Sound)));
63 Succeed();
64 }
65
66 //=================================================================================================
67 // FireEventProcess implementation
68 //=================================================================================================
69
FireEventProcess(IEventDataPtr pEvent,bool isTriggered)70 FireEventProcess::FireEventProcess(IEventDataPtr pEvent, bool isTriggered)
71 :
72 m_pEvent(pEvent),
73 m_bIsTriggered(isTriggered),
74 Process()
75 {
76 }
77
VOnUpdate(uint32 msDiff)78 void FireEventProcess::VOnUpdate(uint32 msDiff)
79 {
80 IEventMgr::Get()->VTriggerEvent(m_pEvent);
81 Succeed();
82 }
83
84 //=================================================================================================
85 // SpawnScoreRowProcess implementation
86 //=================================================================================================
87
SpawnScoreRowProcess(const ScoreRowDef & scoreRowDef)88 SpawnScoreRowProcess::SpawnScoreRowProcess(const ScoreRowDef& scoreRowDef)
89 :
90 m_ScoreRowDef(scoreRowDef),
91 m_State(ScoreRowState_None),
92 m_TimeSinceLastSpawnedItem(0),
93 m_CountOfSpawnedScoreItems(0),
94 m_CountOfCollectedSpawnedScoreItems(0),
95 m_CurrentScore(0),
96 Process()
97 {
98 // Initialize the actor category -> actor list map
99 m_ActorCategoryToActorListMap[ScoreRowActorType_Numbers_ItemsPickedUp] = {};
100 m_ActorCategoryToActorListMap[ScoreRowActorType_Numbers_ScorePointsFromThisRow] = {};
101 m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems] = {};
102
103 m_ScoreItemDefaultSpeed = 300.0;
104 }
105
~SpawnScoreRowProcess()106 SpawnScoreRowProcess::~SpawnScoreRowProcess()
107 {
108 for (Actor* pActor : m_ChildrenActorList)
109 {
110 assert(pActor != NULL);
111
112 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(
113 new EventData_Destroy_Actor(pActor->GetGUID())));
114 }
115
116 for (Actor* pActor : m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems])
117 {
118 assert(pActor != NULL);
119
120 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(
121 new EventData_Destroy_Actor(pActor->GetGUID())));
122 }
123 }
124
125 //-----------------------------------------------------------------------------
126 // VOnInit()
127 //-----------------------------------------------------------------------------
VOnInit()128 void SpawnScoreRowProcess::VOnInit()
129 {
130 Process::VOnInit();
131
132 if (m_State == ScoreRowState_None)
133 {
134 m_State = ScoreRowState_SpawnInitialScoreItem;
135 }
136 }
137
138 //-----------------------------------------------------------------------------
139 // VOnUpdate() - Handle states as described in header, FSM
140 //-----------------------------------------------------------------------------
VOnUpdate(uint32 msDiff)141 void SpawnScoreRowProcess::VOnUpdate(uint32 msDiff)
142 {
143 assert(m_State != ScoreRowState_None);
144
145 if (m_State == ScoreRowState_SpawnInitialScoreItem)
146 {
147 //=========================================================================
148 // STEP 1) - Spawn initial element
149 //=========================================================================
150
151 // Same Y as row and not yet visible, left to the screen
152 Point initialPosition(-50, m_ScoreRowDef.rowStartPosition.y);
153
154 StrongActorPtr pInitialScoreItemActor = SpawnImageActor(
155 m_ScoreRowDef.scoreItemImagePath,
156 initialPosition,
157 m_ScoreRowDef.scoreItemAnimationDef);
158
159 m_pInitialScoreItemActor = pInitialScoreItemActor.get();
160
161 m_ChildrenActorList.push_back(pInitialScoreItemActor.get());
162
163 // Change state
164 m_State = ScoreRowState_MoveInitialScoreItem;
165 }
166 else if (m_State == ScoreRowState_MoveInitialScoreItem)
167 {
168 //=========================================================================
169 // STEP 2) - Move initial score item to its destination
170 //=========================================================================
171
172 // Only the treasure is present at the moment
173 assert(m_ChildrenActorList.size() == 1);
174 assert(m_pInitialScoreItemActor != NULL);
175
176 // Update its position
177 Point scoreItemSpeed(m_ScoreItemDefaultSpeed, 0);
178
179 Point updatedPos = CalculateUpdatedPosition(
180 msDiff,
181 scoreItemSpeed,
182 m_pInitialScoreItemActor->GetPositionComponent()->GetPosition());
183
184 // Check if it arrived at its destination
185 if (updatedPos.x > m_ScoreRowDef.rowStartPosition.x)
186 {
187 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Move_Actor(
188 m_pInitialScoreItemActor->GetGUID(),
189 m_ScoreRowDef.rowStartPosition)));
190
191 // Change state
192 m_State = ScoreRowState_SpawnScoreRowImages;
193 return;
194 }
195 else
196 {
197 // If not, update its position
198 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Move_Actor(
199 m_pInitialScoreItemActor->GetGUID(),
200 updatedPos)));
201 }
202 }
203 else if (m_State == ScoreRowState_SpawnScoreRowImages)
204 {
205 //=========================================================================
206 // STEP 3) - Spawn all score row children - numbers, symbols
207 //=========================================================================
208
209 SoundInfo sound(m_ScoreRowDef.scoreItemPickupSound);
210 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Request_Play_Sound(sound)));
211
212 // TODO: Is it okay to just keep the magic constants here ?
213 // It is done after the original score screen...
214
215 // This all can be data driven, but I see no point at all, since it is exactly the same
216 // in every level's score screen
217
218 //
219 // NUMBERS: Total collected items
220 //
221 {
222 Point totalCollectedItemsRowOffset(40, 0);
223
224 AddNumberImageActors(
225 0,
226 m_ScoreRowDef.countOfPickedUpScoreItems,
227 m_ScoreRowDef.rowStartPosition + totalCollectedItemsRowOffset,
228 ScoreRowActorType_Numbers_ItemsPickedUp);
229 }
230
231 //
232 // SYMBOL: "OF" image
233 //
234 {
235 Point ofSymbolRowOffset(111, 4);
236 std::string symbolImagePath = "/STATES/BOOTY/IMAGES/SYMBOLS/OF1.PID";
237
238 StrongActorPtr pOfSymbolImageActor = SpawnImageActor(
239 symbolImagePath,
240 m_ScoreRowDef.rowStartPosition + ofSymbolRowOffset);
241
242 m_ChildrenActorList.push_back(pOfSymbolImageActor.get());
243 }
244
245 //
246 // NUMBERS: Total count of these items in level
247 //
248 {
249 Point totalMapItemsRowOffset(155, 0);
250
251 AddNumberImageActors(
252 m_ScoreRowDef.countOfMapScoreItems,
253 m_ScoreRowDef.countOfMapScoreItems,
254 m_ScoreRowDef.rowStartPosition + totalMapItemsRowOffset,
255 ScoreRowActorType_None);
256 }
257
258 //
259 // SYMBOL: "X" image
260 //
261 {
262 Point xSymbolRowOffset(220, 4);
263 std::string symbolImagePath = "/STATES/BOOTY/IMAGES/SYMBOLS/TIMES2.PID";
264
265 StrongActorPtr pXSymbolImageActor = SpawnImageActor(
266 symbolImagePath,
267 m_ScoreRowDef.rowStartPosition + xSymbolRowOffset);
268
269 m_ChildrenActorList.push_back(pXSymbolImageActor.get());
270 }
271
272 //
273 // NUMBERS: Score per score item number
274 //
275 {
276 Point scorePerScoreNumberItemOffset(238, 0);
277
278 AddNumberImageActors(
279 m_ScoreRowDef.scoreItemPointsWorth,
280 m_ScoreRowDef.scoreItemPointsWorth,
281 m_ScoreRowDef.rowStartPosition + scorePerScoreNumberItemOffset,
282 ScoreRowActorType_None);
283 }
284
285 //
286 // SYMBOL: "=" image
287 //
288 {
289 Point equalsSymbolRowOffset(312, 2);
290 std::string symbolImagePath = "/STATES/BOOTY/IMAGES/SYMBOLS/EQUALS3.PID";
291
292 StrongActorPtr pEqualsSymbolImageActor = SpawnImageActor(
293 symbolImagePath,
294 m_ScoreRowDef.rowStartPosition + equalsSymbolRowOffset);
295
296 m_ChildrenActorList.push_back(pEqualsSymbolImageActor.get());
297 }
298
299 //
300 // NUMBERS: Total score number
301 //
302 {
303 Point totalScoreNumberRowOffset(338, 0);
304
305 AddNumberImageActors(
306 0,
307 m_ScoreRowDef.countOfPickedUpScoreItems * m_ScoreRowDef.scoreItemPointsWorth,
308 m_ScoreRowDef.rowStartPosition + totalScoreNumberRowOffset,
309 ScoreRowActorType_Numbers_ScorePointsFromThisRow);
310 }
311
312 // Change state
313 m_State = ScoreRowState_SpawnCollectedItems;
314 }
315 else if (m_State == ScoreRowState_SpawnCollectedItems)
316 {
317 //=========================================================================
318 // STEP 4) - Spawn number of collected score items one by one
319 //=========================================================================
320
321 // Check if we already spawned all collected score items for this row
322 if (m_CountOfSpawnedScoreItems == m_ScoreRowDef.countOfPickedUpScoreItems &&
323 m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems].empty())
324 {
325 // CHANGE STATE
326 m_State = ScoreRowState_FinalizeScoreRowLoading;
327 return;
328 }
329
330 Point spawnedScoreItemSpeed = CalculateSpawnedScoreItemSpeed();
331 int spawnInterval = CalculateScoreItemSpawnInterval();
332
333 UpdateSpawnedScoreItemPositions(msDiff, spawnedScoreItemSpeed);
334
335 // Check if we can spawn a new one
336 m_TimeSinceLastSpawnedItem += msDiff;
337 if ((m_CountOfSpawnedScoreItems < m_ScoreRowDef.countOfPickedUpScoreItems) &&
338 (m_TimeSinceLastSpawnedItem > spawnInterval))
339 {
340 std::string spawnedImagePath = m_ScoreRowDef.scoreItemImagePath;
341 // Check if can choose from multiple images
342 if (m_ScoreRowDef.alternativeImagesList.size() > 0)
343 {
344 spawnedImagePath = Util::GetRandomValueFromVector(m_ScoreRowDef.alternativeImagesList);
345 }
346
347 StrongActorPtr pSpawnedItemActor = SpawnImageActor(
348 spawnedImagePath,
349 m_ScoreRowDef.collectedScoreItemSpawnPosition);
350
351 m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems].push_back(pSpawnedItemActor.get());
352 m_CountOfSpawnedScoreItems++;
353 m_TimeSinceLastSpawnedItem = 0;
354 }
355 }
356 else if (m_State == ScoreRowState_FinalizeScoreRowLoading)
357 {
358 //=========================================================================
359 // STEP 5) - Spawn sparkle animation and signalize that this row is loaded
360 //=========================================================================
361
362 // TODO: Spawn sparkles
363
364 IEventMgr::Get()->VQueueEvent(IEventDataPtr(new EventData_Finished_Loading_Row()));
365 m_State = ScoreRowState_FinishedLoading;
366 }
367 else if (m_State == ScoreRowState_FinishedLoading)
368 {
369 //=========================================================================
370 // STEP 6) - Do nothing until this row needs to be destroyed
371 //=========================================================================
372 }
373 else
374 {
375 LOG_ERROR("Unknown state: " + ToStr((int)m_State));
376 assert(false && "Unknown state !");
377 }
378 }
379
380 //-----------------------------------------------------------------------------
381 // ForceSpawnImmediately() - Forces row to finish loading
382 //-----------------------------------------------------------------------------
ForceSpawnImmediately()383 void SpawnScoreRowProcess::ForceSpawnImmediately()
384 {
385 // Nothing to do if already loaded
386 if (m_State == ScoreRowState_FinishedLoading)
387 {
388 return;
389 }
390
391 // Do all the steps
392 if (m_State == ScoreRowState_None)
393 {
394 m_State = ScoreRowState_SpawnInitialScoreItem;
395 }
396 if (m_State == ScoreRowState_SpawnInitialScoreItem)
397 {
398 VOnUpdate(0);
399 assert(m_State == ScoreRowState_MoveInitialScoreItem);
400 }
401 if (m_State == ScoreRowState_MoveInitialScoreItem)
402 {
403 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Move_Actor(
404 m_pInitialScoreItemActor->GetGUID(),
405 m_ScoreRowDef.rowStartPosition)));
406
407 // Change state
408 m_State = ScoreRowState_SpawnScoreRowImages;
409 }
410 if (m_State == ScoreRowState_SpawnScoreRowImages)
411 {
412 VOnUpdate(0);
413 assert(m_State == ScoreRowState_SpawnCollectedItems);
414 }
415 if (m_State == ScoreRowState_SpawnCollectedItems)
416 {
417 SetScore(m_ScoreRowDef.countOfPickedUpScoreItems * m_ScoreRowDef.scoreItemPointsWorth);
418 SetCollectedSpawnedScoreItems(m_ScoreRowDef.countOfPickedUpScoreItems);
419
420 // If we already spawned some moving items, destroy them
421 for (auto iter = m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems].begin();
422 iter != m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems].end();
423 /*iter++*/)
424 {
425 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(
426 new EventData_Destroy_Actor((*iter)->GetGUID())));
427
428 iter = m_ActorCategoryToActorListMap[ScoreRowActorType_MovingScoreItems].erase(iter);
429 }
430
431 m_State = ScoreRowState_FinalizeScoreRowLoading;
432 }
433 if (m_State == ScoreRowState_FinalizeScoreRowLoading)
434 {
435 VOnUpdate(0);
436 assert(m_State == ScoreRowState_FinishedLoading);
437 }
438
439 m_State = ScoreRowState_FinishedLoading;
440 }
441
442 //=============================================================================
443 //
444 // Private methods
445 //
446 //=============================================================================
447
448 // Calculated new position from current position, speed and elapsed time
CalculateUpdatedPosition(uint32 msDiff,const Point & speed,const Point & currentPosition)449 Point SpawnScoreRowProcess::CalculateUpdatedPosition(uint32 msDiff, const Point& speed, const Point& currentPosition)
450 {
451 double secondsDiff = (double)msDiff / 1000.0;
452 Point positionDiff(speed.x * secondsDiff, speed.y * secondsDiff);
453
454 return currentPosition + positionDiff;
455 }
456
457 //-----------------------------------------------------------------------------
458 // CalculateSpawnedScoreItemSpeed() - Calculates speed of spawned items
459 // the more spawned items, the faster
460 //-----------------------------------------------------------------------------
CalculateSpawnedScoreItemSpeed()461 Point SpawnScoreRowProcess::CalculateSpawnedScoreItemSpeed()
462 {
463 double xDifference = m_ScoreRowDef.rowStartPosition.x - m_ScoreRowDef.collectedScoreItemSpawnPosition.x;
464 double yDifference = m_ScoreRowDef.rowStartPosition.y - m_ScoreRowDef.collectedScoreItemSpawnPosition.y;
465
466 double speedFactor = (double)m_CountOfSpawnedScoreItems / 15.0;
467 double speedIncrement = speedFactor * m_ScoreItemDefaultSpeed;
468
469 double speed = m_ScoreItemDefaultSpeed + speedIncrement;
470
471 // Clamp to maximum value
472 if (speed > 3 * m_ScoreItemDefaultSpeed)
473 {
474 speed = 3 * m_ScoreItemDefaultSpeed;
475 }
476
477 return Point(speed, speed * (yDifference / xDifference));
478 }
479
480 //-----------------------------------------------------------------------------
481 // CalculateScoreItemSpawnInterval() - Calculates spawn time of next score item
482 // the more past spawned items, the lower the interval is
483 //-----------------------------------------------------------------------------
CalculateScoreItemSpawnInterval()484 int SpawnScoreRowProcess::CalculateScoreItemSpawnInterval()
485 {
486 const int spawnInterval = 250;
487
488 double spawnFactor = (double)m_CountOfSpawnedScoreItems / 15.0;
489 double intervalDecrement = spawnFactor * spawnInterval / 2;
490
491 // Clamp to maximum value
492 if (intervalDecrement > 175)
493 {
494 intervalDecrement = 175;
495 }
496
497 return spawnInterval - (int)intervalDecrement;
498 }
499
UpdateSpawnedScoreItemPositions(uint32 msDiff,const Point & speed)500 void SpawnScoreRowProcess::UpdateSpawnedScoreItemPositions(uint32 msDiff, const Point& speed)
501 {
502 auto findIt = m_ActorCategoryToActorListMap.find(ScoreRowActorType_MovingScoreItems);
503 // Has to be present
504 assert(findIt != m_ActorCategoryToActorListMap.end());
505
506 ActorList& movingSpawnedScoreItemsList = findIt->second;
507
508 for (auto iter = movingSpawnedScoreItemsList.begin(); iter != movingSpawnedScoreItemsList.end();)
509 {
510 Actor* pSpawnedElem = (*iter);
511 assert(pSpawnedElem != NULL);
512
513 Point updatedPos = CalculateUpdatedPosition(
514 msDiff,
515 speed,
516 pSpawnedElem->GetPositionComponent()->GetPosition());
517
518 // Check if the spawned score item reached its destination
519 if (updatedPos.x > (m_ScoreRowDef.rowStartPosition.x - 10))
520 {
521 // Play the yolo sound
522 SoundInfo sound("/STATES/BOOTY/SOUNDS/BOUNCE1.WAV");
523 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Request_Play_Sound(sound)));
524 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Destroy_Actor(pSpawnedElem->GetGUID())));
525 iter = movingSpawnedScoreItemsList.erase(iter);
526
527 AddScore(m_ScoreRowDef.scoreItemPointsWorth);
528 IncrementCollectedSpawnedScoreItems();
529 }
530 else
531 {
532 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_Move_Actor(pSpawnedElem->GetGUID(), updatedPos)));
533 ++iter;
534 }
535 }
536 }
537
AddNumberImageActors(int numberToDisplay,int futureMaximumNumber,Point position,ScoreRowActorType numberType)538 void SpawnScoreRowProcess::AddNumberImageActors(int numberToDisplay, int futureMaximumNumber, Point position, ScoreRowActorType numberType)
539 {
540 std::string numberStr = ToStr(numberToDisplay);
541 std::string maximumNumberStr = ToStr(futureMaximumNumber);
542 if (numberStr.length() != maximumNumberStr.length())
543 {
544 assert(maximumNumberStr.length() > numberStr.length());
545 int zerosToAdd = maximumNumberStr.length() - numberStr.length();
546 for (int i = 0; i < zerosToAdd; i++)
547 {
548 numberStr.insert(0, "0");
549 }
550 }
551
552 for (char charDigit : numberStr)
553 {
554 int digit = DigitCharToInt(charDigit);
555 std::string numberImagePath;
556
557 // If the displayed number will never change, it does not need all loaded digits
558 if (numberType == ScoreRowActorType_None)
559 {
560 numberImagePath = "/STATES/BOOTY/IMAGES/SCORENUMBERS/" +
561 Util::ConvertToThreeDigitsString(digit) + ".PID";
562 }
563 else
564 {
565 numberImagePath = "/STATES/BOOTY/IMAGES/SCORENUMBERS/*.PID";
566 }
567
568 StrongActorPtr pNumberActor = SpawnImageActor(numberImagePath, position);
569
570 m_ChildrenActorList.push_back(pNumberActor.get());
571
572 if (numberType != ScoreRowActorType_None)
573 {
574 auto findIt = m_ActorCategoryToActorListMap.find(numberType);
575 assert(findIt != m_ActorCategoryToActorListMap.end());
576
577 ActorList& dynamicNumberImagesList = findIt->second;
578 dynamicNumberImagesList.push_back(pNumberActor.get());
579 }
580
581 const Point numberOffset(12, 0);
582
583 position += numberOffset;
584 }
585 }
586
AddScore(int addedScore)587 void SpawnScoreRowProcess::AddScore(int addedScore)
588 {
589 SetScore(m_CurrentScore + addedScore);
590 }
591
SetScore(int score)592 void SpawnScoreRowProcess::SetScore(int score)
593 {
594 int scoreDiff = score - m_CurrentScore;
595 assert(scoreDiff >= 0 && "Setting lesser score ?");
596
597 m_CurrentScore = score;
598
599 auto findIt = m_ActorCategoryToActorListMap.find(ScoreRowActorType_Numbers_ScorePointsFromThisRow);
600 assert(findIt != m_ActorCategoryToActorListMap.end());
601
602 ActorList& totalScoreImageNumberList = findIt->second;
603
604 UpdateScoreImageNumbers(m_CurrentScore, totalScoreImageNumberList);
605
606 // Notify everyone who cares about this
607 IEventMgr::Get()->VTriggerEvent(IEventDataPtr(new EventData_ScoreScreen_Level_Score_Added(scoreDiff)));
608 }
609
610 // This looks pretty much redundant
IncrementCollectedSpawnedScoreItems()611 void SpawnScoreRowProcess::IncrementCollectedSpawnedScoreItems()
612 {
613 m_CountOfCollectedSpawnedScoreItems++;
614 SetCollectedSpawnedScoreItems(m_CountOfCollectedSpawnedScoreItems);
615 }
616
SetCollectedSpawnedScoreItems(int newCount)617 void SpawnScoreRowProcess::SetCollectedSpawnedScoreItems(int newCount)
618 {
619 m_CountOfCollectedSpawnedScoreItems = newCount;
620
621 auto findIt = m_ActorCategoryToActorListMap.find(ScoreRowActorType_Numbers_ItemsPickedUp);
622 assert(findIt != m_ActorCategoryToActorListMap.end());
623
624 ActorList& totalCollectedSpawnedItemsActorList = findIt->second;
625
626 UpdateScoreImageNumbers(m_CountOfCollectedSpawnedScoreItems, totalCollectedSpawnedItemsActorList);
627 }
628