-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProject.cpp
2330 lines (2052 loc) · 83.9 KB
/
Project.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <windows.h>
#include <tchar.h>
#include <memory>
#include <vector>
#include <stack>
#include <cmath>
#include <time.h>
#include <atlImage.h>
#include <map>
#include <chrono>
#include <algorithm>
#include <locale>
#include <codecvt>
#include <Eigen/Dense>
#include <d2d1.h>
#include <d2d1helper.h>
#include <dwrite.h>
#include <wincodec.h>
#include "TotalLoader.h"
#define music_Sync_Beat 0000
#define music_Urgency 0001
#define music_Abiogenesis 0002
#define music_Gloxinia_by_Ruxxi 0003
#define music_To_Where_You_Are 0004
#define music_Menu 90
#define Sound_Attack_1 0100
#define Sound_Attack_2 0101
#define Sound_Attack_3 0102
#define Sound_Hit_1 0110
#define Sound_UI_CHOOSE_1 1000
#define Sound_UI_Start_1 1001
#define image_player_idle 100
#define image_player_idle2 1000
#define image_player_Attack1 200
#define image_player_Attack2 300
#define image_player_Attack3 400
#define image_enemy_1_move 2000
#define image_enemy_1_move_hit 2100
#define image_enemy_1_part 2150
#define image_enemy_2_move 3000
#define image_enemy_2_move_hit 3100
#define image_enemy_2_part 3150
#define image_enemy_3_move 4000
#define image_enemy_3_move_hit 4100
#define image_enemy_3_part 4150
#define image_DeadLine_1 10000
#define image_DeadLine_2 10002
#define image_DeadLine_3 10003
#define image_DeadLine_4 10004
#define image_ProgressBar_1 10010
#define image_ProgressGauge_1 10020
#define image_ViewEffect_White 11020
#define image_ViewEffect_Red 11030
#define image_Background_1 20010
#define image_Background_2 20020
#define image_Vignette_1 20100
#define image_Menu_SongTable_1 30100
#define image_Menu_Table_1 30200
#define image_Menu_Check_1 30250
#define image_Menu_NonCheck_1 30260
#define image_Menu_Start_1 30270
#define image_Menu_Option_1 30300
#define image_Menu_Pause_1 30310
#define image_Menu_SongTable_Info_1 30500
#define image_Menu_SongTable_Info_ImageRect1 30510
#define image_Menu_SongTable_Info_ImageRect2 30511
#define image_Menu_SongTable_Info_ImageRect3 30512
#define image_Menu_SongTable_Info_Image_0 31000
#define image_Menu_SongTable_Info_Image_1 31010
#define image_Menu_SongTable_Info_Image_2 31020
#define image_Menu_SongTable_Info_Image_3 31030
#define image_Menu_SongTable_Info_Image_Lock 123456
#define image_FFT_1 30000
#define image_LogoBack_0 100000
#define image_Logo_0 100001
#define image_Logo_1 100002
#define sprite_player_idle 10
#define sprite_player_idle2 11
#define sprite_player_Attack1 15
#define sprite_player_Attack2 16
#define sprite_player_Attack3 17
#define sprite_enemy_1_move 30
#define sprite_enemy_1_move_hit 35
#define sprite_enemy_1_Part 37
#define sprite_enemy_2_move 40
#define sprite_enemy_2_move_hit 45
#define sprite_enemy_2_Part 47
#define sprite_enemy_3_move 50
#define sprite_enemy_3_move_hit 55
#define sprite_enemy_3_Part 57
#define sprite_DeadLine_1 100
#define sprite_DeadLine_2 102
#define sprite_DeadLine_3 103
#define sprite_DeadLine_4 104
#define sprite_ProgressBar_1 105
#define sprite_ProgressGauge_1 110
#define sprite_ViewEffect_White 200
#define sprite_ViewEffect_Red 201
#define sprite_Menu_SongTable_1 300
#define sprite_Menu_Table_1 310
#define sprite_Menu_Level_Check 314
#define sprite_Menu_Level_NonCheck 315
#define sprite_Menu_Start_1 320
#define sprite_Menu_Option_1 330
#define sprite_Menu_Pause_1 331
#define sprite_Menu_SongTable_Info_1 400
#define sprite_Menu_SongTable_Info_ImageRect1 410
#define sprite_Menu_SongTable_Info_ImageRect2 411
#define sprite_Menu_SongTable_Info_ImageRect3 412
#define sprite_Menu_SongTable_Info_Image_0 420
#define sprite_Menu_SongTable_Info_Image_1 421
#define sprite_Menu_SongTable_Info_Image_2 422
#define sprite_Menu_SongTable_Info_Image_3 423
#define sprite_Menu_SongTable_Info_Image_Lock 123456
#define sprite_FFT_1 1001
#define sprite_Background_1 501
#define sprite_Background_2 502
#define sprite_LogoBack_0 2000
#define sprite_Logo_0 2001
#define sprite_Logo_1 2002
float ProjectI::hardLatency = 0.00f;
FMOD::Channel* channel;
TCHAR path[1000];
std::shared_ptr<Sprite> sprite;
std::weak_ptr<Sprite> spriteWeak;
ID2D1Bitmap* image;
ProjectI* project;
TCHAR tempText[MAX_TEXT_SIZE];
std::weak_ptr<Sprite> SpriteGroupLoad(const TCHAR* mainPath, const TCHAR* SubPath, const TCHAR* FName, int startIndex, const TCHAR* LName, int count, int resourceIndex, int spriteIndex)
{
sprite = std::make_shared<Sprite>();
for (int i = 0; i < count; i++)
{
_stprintf_s(path, _countof(path), L"%s%s%s%d%s", mainPath, SubPath, FName, i + startIndex, LName);
image = Resources::ImageLoading(resourceIndex + i, path);
sprite->PushImage(image);
}
sprite->spriteSize = Eigen::Vector2i(image->GetSize().width, image->GetSize().height);
return Resources::PushSprite(spriteIndex, sprite);
}
void ProjectI::Init()
{
project = this;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Player\\Idle\\", L"", 31, L".png",
40, image_player_idle, sprite_player_idle);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.73333333);
sprite->time = 0.8f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Player\\Idle2\\", L"", 0, L".png",
31, image_player_idle2, sprite_player_idle2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.73333333);
sprite->time = 0.8f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Player\\Attack1\\", L"", 71, L".png",
10, image_player_Attack1, sprite_player_Attack1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.73333333);
sprite->time = 0.25f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Player\\Attack2\\", L"", 81, L".png",
10, image_player_Attack2, sprite_player_Attack2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.73333333);
sprite->time = 0.25f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Player\\Attack3\\", L"", 101, L".png",
20, image_player_Attack3, sprite_player_Attack3);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.73333333);
sprite->time = 0.5f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy1\\Normal\\", L"Walk", 1, L".png",
4, image_enemy_1_move, sprite_enemy_1_move);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 0.5f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy2\\Normal\\", L"Enemy", 1, L".png",
6, image_enemy_2_move, sprite_enemy_2_move);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.75);
sprite->time = 0.35f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy3\\Normal\\", L"Enemy", 1, L".png",
4, image_enemy_3_move, sprite_enemy_3_move);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 0.35f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy1\\Part\\", L"Part", 1, L".png",
21, image_enemy_1_part, sprite_enemy_1_Part);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1000.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy2\\Part\\", L"Part", 1, L".png",
16, image_enemy_2_part, sprite_enemy_2_Part);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1000.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Enemy3\\Part\\", L"Part", 1, L".png",
26, image_enemy_3_part, sprite_enemy_3_Part);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1000.0f;
//-----------------------------------------------------------
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"DeadLine", 0, L".png",
1, image_DeadLine_1, sprite_DeadLine_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"DeadLine", 2, L".png",
1, image_DeadLine_2, sprite_DeadLine_2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 1);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"DeadLine", 3, L".png",
1, image_DeadLine_3, sprite_DeadLine_3);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 1);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"DeadLine", 4, L".png",
1, image_DeadLine_4, sprite_DeadLine_4);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 1);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Background_Floor_", 1, L".png",
1, image_Background_1, sprite_Background_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Background_", 1, L".png",
1, image_Background_2, sprite_Background_2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"ProgressBar", 0, L".png",
1, image_ProgressBar_1, sprite_ProgressBar_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"ProgressGauge", 0, L".png",
1, image_ProgressGauge_1, sprite_ProgressGauge_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"ViewEffect_White", 0, L".png",
1, image_ViewEffect_White, sprite_ViewEffect_White);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"ViewEffect_Red", 0, L".png",
1, image_ViewEffect_Red, sprite_ViewEffect_Red);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Vignette_", 0, L".png",
1, image_Vignette_1, sprite_Vignette_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"FFT_Effect_", 1, L".png",
1, image_FFT_1, sprite_FFT_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0, 0);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"MenuTable", 1, L".png",
1, image_Menu_Table_1, sprite_Menu_Table_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.042, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitleBase_", 0, L".png",
1, image_Menu_SongTable_1, sprite_Menu_SongTable_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitleLevel_Check", 0, L".png",
4, image_Menu_Check_1, sprite_Menu_Level_Check);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitleLevel_NonCheck", 0, L".png",
4, image_Menu_NonCheck_1, sprite_Menu_Level_NonCheck);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Info_", 0, L".png",
1, image_Menu_SongTable_Info_1, sprite_Menu_SongTable_Info_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Info_ImageRect", 0, L".png",
1, image_Menu_SongTable_Info_ImageRect1, sprite_Menu_SongTable_Info_ImageRect1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Info_ImageRect", 1, L".png",
1, image_Menu_SongTable_Info_ImageRect2, sprite_Menu_SongTable_Info_ImageRect2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Info_ImageRect", 2, L".png",
1, image_Menu_SongTable_Info_ImageRect3, sprite_Menu_SongTable_Info_ImageRect3);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Image", 0, L".png",
1, image_Menu_SongTable_Info_Image_0, sprite_Menu_SongTable_Info_Image_0);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Image", 1, L".png",
1, image_Menu_SongTable_Info_Image_1, sprite_Menu_SongTable_Info_Image_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Image", 2, L".png",
1, image_Menu_SongTable_Info_Image_2, sprite_Menu_SongTable_Info_Image_2);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Image", 3, L".png",
1, image_Menu_SongTable_Info_Image_3, sprite_Menu_SongTable_Info_Image_3);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Image", 123456, L".png",
1, image_Menu_SongTable_Info_Image_Lock, sprite_Menu_SongTable_Info_Image_Lock);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"SongTitle_Start", 0, L".png",
1, image_Menu_Start_1, sprite_Menu_Start_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Menu_Option", 0, L".png",
2, image_Menu_Option_1, sprite_Menu_Option_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Menu_Pause", 0, L".png",
2, image_Menu_Pause_1, sprite_Menu_Pause_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Logo_", 0, L".png",
1, image_LogoBack_0, sprite_LogoBack_0);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\Menu\\", L"GameLogo", 0, L".png",
1, image_Logo_0, sprite_Logo_0);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.5);
sprite->time = 1.0f;
spriteWeak = SpriteGroupLoad(L".\\Resources\\Image\\", L"Object\\", L"Enemy", 1, L".png",
1, image_Logo_1, sprite_Logo_1);
sprite = spriteWeak.lock();
sprite->pivot = Eigen::Vector2d(0.5, 0.7333333);
sprite->time = 1.0f;
Resources::SoundLoading(music_Menu, ".\\Resources\\Sound\\Title Screen Loop.mp3");
Resources::SoundLoading(music_Sync_Beat, ".\\Resources\\Sound\\Sync_Beat.mp3");
Resources::SoundLoading(music_Urgency, ".\\Resources\\Sound\\Urgency.mp3");
Resources::SoundLoading(music_Abiogenesis, ".\\Resources\\Sound\\Abiogenesis.mp3");
Resources::SoundLoading(music_Gloxinia_by_Ruxxi, ".\\Resources\\Sound\\Gloxinia by Ruxxi.mp3");
Resources::SoundLoading(music_To_Where_You_Are, ".\\Resources\\Sound\\To Where You Are.mp3");
Resources::SoundLoading(Sound_Attack_1, ".\\Resources\\Sound\\Attack\\Attack1.mp3");
Resources::SoundLoading(Sound_Attack_2, ".\\Resources\\Sound\\Attack\\Attack2.mp3");
Resources::SoundLoading(Sound_Attack_3, ".\\Resources\\Sound\\Attack\\Attack3.mp3");
Resources::SoundLoading(Sound_Hit_1, ".\\Resources\\Sound\\Hit\\Hit1.ogg");
Resources::SoundLoading(Sound_UI_CHOOSE_1, ".\\Resources\\Sound\\UI\\Choose.mp3");
Resources::SoundLoading(Sound_UI_Start_1, ".\\Resources\\Sound\\UI\\Start.wav");
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(246 / 255.0, 241 / 255.0, 134.0 / 255.0, 1.0)
), &(project->globalData.perfectBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(100 / 255.0, 155 / 255.0, 255.0 / 255.0, 1.0)
), &(project->globalData.goodBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(188 / 255.0, 183 / 255.0, 190.0 / 255.0, 1.0)
), &(project->globalData.normalBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(220 / 255.0, 58 / 255.0, 73.0 / 255.0, 1.0)
), &(project->globalData.badBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF::White
), &(project->globalData.whiteBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(50 / 255.0, 50 / 255.0, 53.0 / 255.0, 1.0)
), &(project->globalData.grayBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(130 / 255.0, 177 / 255.0, 218.0 / 255.0, 1.0)
), &(project->globalData.SBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(228 / 255.0, 83 / 255.0, 83.0 / 255.0, 1.0)
), &(project->globalData.ABrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(130 / 255.0, 200 / 255.0, 107.0 / 255.0, 1.0)
), &(project->globalData.BBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(209 / 255.0, 204 / 255.0, 127.0 / 255.0, 1.0)
), &(project->globalData.CBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(120 / 255.0, 96 / 255.0, 74.0 / 255.0, 1.0)
), &(project->globalData.DBrush));
GameManager::mainRT->CreateSolidColorBrush(
D2D1::ColorF(
D2D1::ColorF(99 / 255.0, 101 / 255.0, 104.0 / 255.0, 1.0)
), &(project->globalData.FBrush));
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
108.0f,
L"ko-kr",
&project->globalData.comboFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
72.0f,
L"ko-kr",
&project->globalData.scoreFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
34.0f,
L"ko-kr",
&project->globalData.soundFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
36.0f,
L"ko-kr",
&project->globalData.menuFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_ITALIC,
DWRITE_FONT_STRETCH_NORMAL,
56.0f,
L"ko-kr",
&project->globalData.menuScoreFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
32.0f,
L"ko-kr",
&project->globalData.menuNameFont);
GameManager::pWFactory->CreateTextFormat(
L"PF스타더스트S",
nullptr,
DWRITE_FONT_WEIGHT_BOLD,
DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
86.0f,
L"ko-kr",
&project->globalData.menuRankFont);
GameManager::soundSystem->getMasterChannelGroup(&GameManager::channelGroup);
GameManager::soundSystem->createDSPByType(FMOD_DSP_TYPE_FFT, &GameManager::dsp);
GameManager::channelGroup->addDSP(0, GameManager::dsp);
GameManager::dsp->setParameterInt(FMOD_DSP_FFT_WINDOWTYPE, FMOD_DSP_FFT_WINDOW_HANNING);
GameManager::dsp->setParameterInt(FMOD_DSP_FFT_WINDOWSIZE, GameManager::fftSize);
GameManager::dsp->setBypass(false);
GameManager::dsp->setActive(true);
project->songTotalJsonData = jsonReader.Read(".\\Resources\\GameData\\SongInfo.json");
project->songUserJsonData = jsonReader.Read(".\\Resources\\GameData\\SongUser.json");
project->LoadSong();
SongData nonSong;
nonSong.name = L"Lock";
nonSong.isLock = true;
nonSong.level = 0;
nonSong.soundImageResourceCode = image_Menu_SongTable_Info_Image_Lock;
nonSong.bestCombo = 0;
nonSong.bestScore = 0;
project->PushSong(nonSong);
project->PushSong(nonSong);
project->PushSong(nonSong);
project->PushSong(nonSong);
project->PushSong(nonSong);
project->PushSong(nonSong);
this->inGame = std::make_shared<InGame>();
this->outGame = std::make_shared<OutGame>();
GameManager::mainWorld = this->outGame;
}
void ProjectI::LoadSong()
{
auto songInfoGroup = songTotalJsonData["SongInfo"];
int songIndex = 0;
std::string first = "Song_";
nlohmann::json songData;
while (!(songData = songInfoGroup[first + std::to_string(songIndex)]).is_null())
{
SongData newSongData;
newSongData.SetData(songData);
project->PushSong(newSongData);
songIndex++;
}
}
void ProjectI::PushSong(SongData data)
{
songDataList.push_back(data);
}
void SongData::SetData(nlohmann::json songData)
{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> convertString;
songJson = songData;
auto nodeDatas = songData["Datas"];
name = convertString.from_bytes(JsonReader::stringFormat(songData["Name"].get<std::string>()));
soundResourceCode = songData["Code"].get<int>();
soundImageResourceCode = songData["LogoCode"].get<int>();
level = songData["Level"].get<int>();
auto codeString = std::to_string(soundResourceCode);
auto songCode = codeString.c_str();
auto nowSongUserData = project->songUserJsonData["SongUser"][songCode];
if (nowSongUserData.is_null())
{
project->songUserJsonData["SongUser"][songCode]["bestCombo"] = 0;
project->songUserJsonData["SongUser"][songCode]["bestScore"] = 0;
project->jsonReader.Write(".\\Resources\\GameData\\SongUser.json", project->songUserJsonData);
}
bestCombo = project->songUserJsonData["SongUser"][songCode]["bestCombo"];
bestScore = project->songUserJsonData["SongUser"][songCode]["bestScore"];
for (int i = 0; i < nodeDatas.size(); i++)
{
if (!nodeDatas.at(i)["Type"].is_null())
{
NodeData currentData;
int type = nodeDatas.at(i)["Type"].get<int>();
int id = nodeDatas.at(i)["ID"].get<int>();
double time = nodeDatas.at(i)["Time"].is_null() ? -1.0 : nodeDatas.at(i)["Time"].get<double>();
double speed = nodeDatas.at(i)["Speed"].is_null() ? 3 : nodeDatas.at(i)["Speed"].get<double>();
std::string direction = nodeDatas.at(i)["Direction"].is_null() ? "L" : nodeDatas.at(i)["Direction"].get<std::string>();
double reTime = nodeDatas.at(i)["ReTime"].is_null() ? 3.0 : nodeDatas.at(i)["ReTime"].get<double>();
currentData.id = id;
currentData.type = type;
currentData.time = time;
currentData.reTime = reTime;
currentData.speed = speed;
if (direction._Equal("L"))
currentData.direction = 1;
if (direction._Equal("R"))
currentData.direction = -1;
nodeDataList.push_back(currentData);
}
}
}
void SongData::SaveData()
{
auto codeString = std::to_string(soundResourceCode);
auto songCode = codeString.c_str();
auto nowSongUserData = project->songUserJsonData["SongUser"][songCode];
project->songUserJsonData["SongUser"][songCode]["bestCombo"] = bestCombo;
project->songUserJsonData["SongUser"][songCode]["bestScore"] = bestScore;
project->jsonReader.Write(".\\Resources\\GameData\\SongUser.json", project->songUserJsonData);
}
std::shared_ptr<SpriteRenderer> sr;
std::shared_ptr<EnemyEntityComponent> enemyScript;
class Data
{
public:
int a = 10;
float b = 10;
std::string s = "Hello";
};
void OutGame::Init()
{
World::Init();
std::shared_ptr<GameObject> mainCameraObject = GameManager::mainWorld->CreateGameObject();
GameManager::mainCamera = mainCameraObject->AddComponent<Camera>(std::make_shared<Camera>());
auto CC = mainCameraObject->AddComponent<CameraControl>(std::make_shared<CameraControl>());
CC->targetPosition = Eigen::Vector2d(0, 0);
mainCameraObject->transform->position = Eigen::Vector2d(0, 0);
auto deadLineObj = GameManager::mainWorld->CreateGameObject();
auto deadLine_L_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_L_SR->SetSprite(Resources::GetSprite(sprite_LogoBack_0));
deadLine_L_SR->zIndex = 0;
deadLine_L_SR->flip.x() = 1;
deadLine_L_SR->renderSize = Eigen::Vector2d(deadLine_L_SR->sprite.lock()->spriteSize.x() * 4, deadLine_L_SR->sprite.lock()->spriteSize.y() * 6);
deadLineObj->transform->position = Eigen::Vector2d(0, 0);
}
void OutGame::Update()
{
World::Update();
switch (animationEventIndex)
{
case 0:
{
if (animationTime >= 1)
{
FMOD::Channel* channel;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_3), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
animationEventIndex++;
}
break;
}
case 1:
{
if (animationTime >= 2)
{
FMOD::Channel* channel;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_1), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
animationEventIndex++;
}
break;
}
case 2:
{
if (animationTime >= 2.25)
{
FMOD::Channel* channel;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_1), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
animationEventIndex++;
}
break;
}
case 3:
{
if (animationTime >= 2.5)
{
FMOD::Channel* channel;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_1), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
animationEventIndex++;
}
break;
}
case 4:
{
if (animationTime >= 2.75)
{
FMOD::Channel* channel;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_1), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
animationEventIndex++;
}
break;
}
case 5:
{
if (animationTime >= 4)
{
FMOD::Channel* channel;
FMOD::Channel* channel2;
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Attack_1), 0, false, &channel);
channel->setVolume(GameManager::masterSound * GameManager::SFXSound * 0.40f);
channel->setPitch(0.75f);
GameManager::soundSystem->playSound(Resources::GetSound(Sound_Hit_1), 0, false, &channel2);
channel2->setVolume(GameManager::masterSound * GameManager::SFXSound);
animObj1 = GameManager::mainWorld->CreateGameObject();
auto animObj1SR = animObj1.lock()->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
animObj1SR->SetSprite(Resources::GetSprite(sprite_Logo_1));
animObj1SR->zIndex = 12;
animObj1SR->flip.x() = 0;
animObj1SR->isAnimation = false;
animObj1SR->animationIndex = 0;
animObj1SR->renderSize = Eigen::Vector2d(animObj1SR->sprite.lock()->spriteSize.x() * 70, animObj1SR->sprite.lock()->spriteSize.y() * 70);
animObj1.lock()->transform->position = Eigen::Vector2d(540, 200);
animObj1.lock()->transform->rotationZ = -20;
GameManager::mainCamera->gameObject.lock()->GetComponent<CameraControl>()->Shock(100, 1, Eigen::Vector2d(100, 100));
animationEventIndex++;
}
break;
}
case 6:
{
if (animationTime >= 5)
{
animObj2 = GameManager::mainWorld->CreateGameObject();
auto animObj1SR = animObj2.lock()->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
animObj1SR->SetSprite(Resources::GetSprite(sprite_Logo_0));
animObj1SR->zIndex = 10;
animObj1SR->flip.x() = 0;
animObj1SR->isAnimation = false;
animObj1SR->animationIndex = 0;
animObj1SR->renderSize = Eigen::Vector2d(animObj1SR->sprite.lock()->spriteSize.x() * 2, animObj1SR->sprite.lock()->spriteSize.y() * 2);
animObj2.lock()->transform->rotationZ = 0;
auto effectScript = animObj1.lock()->AddComponent<EffectComponent>(std::make_shared<EffectComponent>());
effectScript->Execute(11);
effectScript->SetDirection(1);
animationEventIndex++;
}
break;
}
case 7:
{
if (animationTime >= 8)
{
animationEventIndex++;
}
break;
}
case 8:
{
animObj2.lock()->GetComponent<SpriteRenderer>()->alphaValue -= 0.02 * GameManager::deltaTime * 60;
if (animationTime >= 9.5)
{
animationEventIndex++;
}
break;
}
default:
{
GameManager::mainWorld = project->inGame;
GameManager::mainWorld->Init();
auto a = GameManager::mainCamera->gameObject.lock()->GetComponent<CameraControl>();
a->Start();
a->isFirst = false;
a->HolyEffect(20, 1, 0);
break;
}
}
if (InputManager::GetKeyDown('S'))
{
GameManager::mainWorld = project->inGame;
GameManager::mainWorld->Init();
}
animationTime += GameManager::deltaTime;
}
void InGame::Init()
{
World::Init();
nodeSystem = std::make_shared<NodeSystem>();
std::shared_ptr<GameObject> mainCameraObject = GameManager::mainWorld->CreateGameObject();
GameManager::mainCamera = mainCameraObject->AddComponent<Camera>(std::make_shared<Camera>());
auto CC = mainCameraObject->AddComponent<CameraControl>(std::make_shared<CameraControl>());
CC->targetPosition = Eigen::Vector2d(0, 0);
mainCameraObject->transform->position = Eigen::Vector2d(0, 0);
auto obj = GameManager::mainWorld->CreateGameObject();
sr = obj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
sr->SetSprite(Resources::GetSprite(sprite_player_idle));
sr->zIndex = 1;
sr->renderSize = Eigen::Vector2d(sr->sprite.lock()->spriteSize.x() * 3.0f, sr->sprite.lock()->spriteSize.y() * 3.0f);
obj->transform->position = playerPosition;
/*
std::shared_ptr<GameObject> obj2 = GameManager::mainWorld->CreateGameObject();
auto sr2 = obj2->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
sr2->renderSize = Eigen::Vector2d(1920, 1080);
sr2->SetSprite(Resources::GetImage(1));
sr2->pivot = Eigen::Vector2d(0, 0);
sr2->alpha = 0;
obj2->transform->position = Eigen::Vector2d(0, 0);
*/
songObj = GameManager::mainWorld->CreateGameObject();
songText = songObj.lock()->AddComponent<TextRenderer>(std::make_shared<TextRenderer>());
songObj.lock()->transform->position = Eigen::Vector2d(playerPosition.x(), playerPosition.y()+300);
songText.lock()->renderSize = Eigen::Vector2d(1000, 100);
songText.lock()->pivot = Eigen::Vector2d(0.5, 0.5);
songText.lock()->SetFont(project->globalData.soundFont, DWRITE_TEXT_ALIGNMENT_CENTER);
songText.lock()->SetText(L"Cytus2 : Urgency-SIHanatsuka");
songText.lock()->SetBrush(project->globalData.whiteBrush);
songText.lock()->zIndex = -5;
comboObj = GameManager::mainWorld->CreateGameObject();
comboText = comboObj.lock()->AddComponent<TextRenderer>(std::make_shared<TextRenderer>());
comboObj.lock()->transform->position = Eigen::Vector2d(playerPosition.x(), playerPosition.y() + -290);
comboText.lock()->renderSize = Eigen::Vector2d(500, 200);
comboText.lock()->pivot = Eigen::Vector2d(0.5, 0);
comboText.lock()->SetFont(project->globalData.comboFont, DWRITE_TEXT_ALIGNMENT_CENTER);
comboText.lock()->SetBrush(project->globalData.perfectBrush);
comboText.lock()->zIndex = -5;
auto comboEffect = comboObj.lock()->AddComponent<EffectComponent>(std::make_shared<EffectComponent>());
comboEffect->targetPosition = comboObj.lock()->transform->position;
scoreObj = GameManager::mainWorld->CreateGameObject();
scoreText = scoreObj.lock()->AddComponent<TextRenderer>(std::make_shared<TextRenderer>());
scoreObj.lock()->transform->position = Eigen::Vector2d(playerPosition.x(), playerPosition.y() + 90);
scoreText.lock()->renderSize = Eigen::Vector2d(600, 200);
scoreText.lock()->pivot = Eigen::Vector2d(0.5, 0);
scoreText.lock()->SetFont(project->globalData.scoreFont, DWRITE_TEXT_ALIGNMENT_CENTER);
scoreText.lock()->SetText(L"000,000");
scoreText.lock()->SetBrush(project->globalData.whiteBrush);
scoreText.lock()->zIndex = -5;
//--------DeadLine--------
auto deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_L_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_L_SR->SetSprite(Resources::GetSprite(sprite_DeadLine_1));
deadLine_L_SR->zIndex = 10;
deadLine_L_SR->flip.x() = 1;
deadLine_L_SR->renderSize = Eigen::Vector2d(deadLine_L_SR->sprite.lock()->spriteSize.x() * 3, deadLine_L_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x() - playerHitDistance, playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_R_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_R_SR->SetSprite(Resources::GetSprite(sprite_DeadLine_1));
deadLine_R_SR->zIndex = 10;
deadLine_R_SR->flip.x() = 1;
deadLine_R_SR->renderSize = Eigen::Vector2d(deadLine_R_SR->sprite.lock()->spriteSize.x() * 3, deadLine_R_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x() + playerHitDistance, playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_L_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_L_SR->SetSprite(Resources::GetSprite(sprite_DeadLine_4));
deadLine_L_SR->zIndex = -10;
deadLine_L_SR->flip.x() = 1;
deadLine_L_SR->renderSize = Eigen::Vector2d(deadLine_L_SR->sprite.lock()->spriteSize.x() * 3, deadLine_L_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x() - playerHitDistance, playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_R_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_R_SR->SetSprite(Resources::GetSprite(sprite_DeadLine_4));
deadLine_R_SR->zIndex = -10;
deadLine_R_SR->flip.x() = 1;
deadLine_R_SR->renderSize = Eigen::Vector2d(deadLine_R_SR->sprite.lock()->spriteSize.x() * 3, deadLine_R_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x() + playerHitDistance, playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_R_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_R_SR->SetSprite(Resources::GetSprite(sprite_Background_1));
deadLine_R_SR->zIndex = -99;
deadLine_R_SR->flip.x() = 1;
deadLine_R_SR->renderSize = Eigen::Vector2d(deadLine_R_SR->sprite.lock()->spriteSize.x() * 3, deadLine_R_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x(), playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
deadLine_R_SR = deadLineObj->AddComponent<SpriteRenderer>(std::make_shared<SpriteRenderer>());
deadLine_R_SR->SetSprite(Resources::GetSprite(sprite_Background_2));
deadLine_R_SR->zIndex = -100;
deadLine_R_SR->flip.x() = 1;
deadLine_R_SR->renderSize = Eigen::Vector2d(deadLine_R_SR->sprite.lock()->spriteSize.x()*3, deadLine_R_SR->sprite.lock()->spriteSize.y() * 3);
deadLineObj->transform->position = Eigen::Vector2d(playerPosition.x(), playerPosition.y());
deadLineObj = GameManager::mainWorld->CreateGameObject();
auto PP_OR = deadLineObj->AddComponent<OverlayRenderer>(std::make_shared<OverlayRenderer>());
PP_OR->SetSprite(Resources::GetSprite(sprite_Vignette_1));
PP_OR->zIndex = 80;
PP_OR->alphaValue = 1.0f;
deadLineObj->transform->position = Eigen::Vector2d(0, 0);