-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTutorial.cs
More file actions
529 lines (479 loc) · 24 KB
/
Tutorial.cs
File metadata and controls
529 lines (479 loc) · 24 KB
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
using RhythmBase.Global.Components;
using RhythmBase.Global.Components.Easing;
using RhythmBase.Global.Components.RichText;
using RhythmBase.Global.Components.Vector;
using RhythmBase.Global.Settings;
using RhythmBase.RhythmDoctor.Components;
using RhythmBase.RhythmDoctor.Components.RDLang;
using RhythmBase.RhythmDoctor.Events;
using RhythmBase.RhythmDoctor.Extensions;
using RhythmBase.RhythmDoctor.Utils;
using System.Text.Json;
using RhythmBase.RhythmDoctor.Components.Linq;
using RhythmBase.RhythmDoctor;
namespace RhythmBase.Test
{
[TestClass]
public sealed class Tutorial
{
private static RDLevel _rdlevel = RDLevel.Default;
[TestMethod]
public void CreateAnEmptyLevel()
{
using RDLevel emptyLevel = [];
Console.WriteLine(emptyLevel); // "" Count = 0
}
[TestMethod]
public void CreateADefaultLevel()
{
using RDLevel defaultLevel = RDLevel.Default;
Console.WriteLine(defaultLevel); // "" Count = 3
}
[TestMethod]
public void ReadOrWriteLevel()
{
lock (this)
{
// Directly read a level file
using RDLevel rdlevel1 = RDLevel.FromFile(@"your\level.rdlevel");
// Read a level pack file
using RDLevel rdlevel2 = RDLevel.FromFile(@"your\level.rdzip");
// Read a compressed level pack
using RDLevel rdlevel3 = RDLevel.FromFile(@"your\level.zip");
// Write a level file
rdlevel1.SaveToFile(@"your\outLevel.rdlevel");
}
}
[TestMethod]
public void ReadOrWriteLevelWithSettings()
{
// Create custom read settings
LevelReadSettings settings = new()
{
// Handling of inactive events
InactiveEventsHandling = InactiveEventsHandling.Store,
// Handling of unreadable events
// Common when sprite events are not bound to sprite tracks, etc.
UnreadableEventsHandling = UnreadableEventHandling.Store,
// Enable macro event processing
EnableMacroEvent = true,
// Unzip all files in a zip level pack into the cache path below
// This is usually the faster option
ZipFileProcessMethod = ZipFileProcessMethod.AllFiles,
// Load asset paths when reading or writing the level
LoadAssets = true,
};
// The cache path is required when reading zip level packs
// Default is the Temp path.
GlobalSettings.CachePath = @"your\cache\path";
lock (this)
{ using RDLevel _rdlevel1 = RDLevel.FromFile(@"your\level.rdlevel", settings); }
}
[TestMethod]
public void ConvertLevelToJsonDocument()
{
LevelWriteSettings settings = new();
JsonDocument jdoc = _rdlevel.ToJsonDocument();
string json = _rdlevel.ToJsonString(settings);
Console.WriteLine(jdoc);
Console.WriteLine(json);
}
[TestMethod]
public void ReadOrWriteEventHandling()
{
LevelWriteSettings settings = new();
settings.AfterWriting += Settings_AfterReading;
// This will be triggered after writing is finished
void Settings_AfterReading(object? sender, EventArgs e)
{
Console.WriteLine("After writing");
}
_rdlevel.SaveToFile(@"your\outLevel.rdlevel", settings);
}
[TestMethod]
public void FindEventsInLevel()
{
// Find MoveRow events between bar 3 and 5, and in event rows 0 to 2
IEnumerable<MoveRow> list = _rdlevel
.OfEvent<MoveRow>()
.InRange(new(3, 1), new(5, 1))// From Bar 3 to 5
.Where(i => 0 <= i.Y && i.Y < 3); // In event rows 0 to 2
}
[TestMethod]
public void FindEventsInDecoration()
{
_rdlevel.Decorations.Add([]);
// Find the AddClassicBeat event in the row decoration between beat (11,1) and (13,1)
IEventEnumerable<AddClassicBeat> list = _rdlevel.Decorations[0]
.OfEvent<AddClassicBeat>()
.InRange(
new RDBeat(11, 1), // Start searching from bar 11, beat 1
new RDBeat(13, 1) // End searching at bar 13, beat 1
);
}
[TestMethod]
public void CreateBeatWithoutBinding()
{
// Create a beat not associated with a level
RDBeat beat1 = new(11);
RDBeat beat2 = new(2, 3);
RDBeat beat3 = (2, 3);
RDBeat beat4 = new(TimeSpan.FromSeconds(11.45));
Console.WriteLine(beat1); // [10,?,?]
Console.WriteLine(beat2); // [?,(2, 3),?]
Console.WriteLine(beat3); // [?,(2, 3),?]
Console.WriteLine(beat4); // [?,?,00:00:11.4500000]
(int bar, float beat) = beat2;
}
[TestMethod]
public void CreateBeatWithBinding()
{
// Create a beat associated with a level
RDBeat beat1 = _rdlevel.BeatOf(11);
RDBeat beat2 = _rdlevel.Calculator.BeatOf(2, 3);
RDBeat beat3 = beat1 - 10 + TimeSpan.FromSeconds(11.45);
Console.WriteLine(beat1); // [2,3]
Console.WriteLine(beat2); // [2,3]
Console.WriteLine(beat3); // [3,4.083334]
}
[TestMethod]
public void LinkBeats()
{
RDBeat beat1 = _rdlevel.BeatOf(1);
RDBeat beat2 = beat1.WithoutLink();
Console.WriteLine(beat1.FromSameLevel(beat2)); // False
Console.WriteLine(beat1.FromSameLevelOrNull(beat2)); // True
RDBeat beat3 = beat2.WithLink(_rdlevel.Calculator);
(int bar, float beat) = beat3; // (1, 1)
}
[TestMethod]
public void ConvertTimeUnit()
{
(float, float) barbeat = _rdlevel.Calculator.TimeSpanToBarBeat(TimeSpan.FromSeconds(19.19));
Console.WriteLine(barbeat); // (4, 8.983334)
}
[TestMethod]
public void RangeUsage()
{
IEventEnumerable<IBaseEvent> result = _rdlevel.InRange(new RDRange(_rdlevel.DefaultBeat + 10, null));
}
[TestMethod]
public void ExpressionUsage()
{
RDExpression exp1 = new("i2+1");
RDExpression exp2 = new(30);
RDExpression exp3 = new("25.5");
RDExpression result = exp1 - exp2 * exp3;
Console.WriteLine(result.ExpressionValue); // i2+1-765
}
[TestMethod]
public void AddAndRemoveEvent()
{
Comment comment = new() { Beat = new(12), Text = "My_comment." };
Console.WriteLine(comment); // [11,?,?] Comment My_comment.
_rdlevel.Add(comment);
Console.WriteLine(comment); // [2,4] Comment My_comment.
_rdlevel.Remove(comment);
Console.WriteLine(comment); // [11,?,?] Comment My_comment.
}
[TestMethod]
public void AddAndRemoveCpbEvent()
{
RDLevel level = [];
Comment temp = new() { Beat = (5, 3) };
level.Add(temp);
Console.WriteLine(temp.Beat); // [5,3]
Console.WriteLine(temp.Beat.BeatOnly); // 35
SetCrotchetsPerBar cpb = new() { Beat = (3, 1), CrotchetsPerBar = 6 };
level.Add(cpb, BeatChangeStrategy.Default);
Console.WriteLine(temp.Beat); // [6,1]
Console.WriteLine(temp.Beat.BeatOnly); // 35 (unchanged due to Default strategy)
level.Remove(cpb, BeatChangeStrategy.Default);
level.Add(cpb, BeatChangeStrategy.RDLE);
Console.WriteLine(temp.Beat); // [5,3] (unchanged due to RDLE strategy)
Console.WriteLine(temp.Beat.BeatOnly); // 31
level.Remove(cpb, BeatChangeStrategy.RDLE);
}
[TestMethod]
public void AddForwardEvent()
{
MyEvent myEvent = new();
myEvent.MyProperty = new(2, "i3+1");
_rdlevel.Add(myEvent);
myEvent.Beat = new(8);
Console.WriteLine(myEvent.Type); // ForwardEvent
Console.WriteLine(myEvent.ActualType); // MyEvent
}
[TestMethod]
public void EventTypeUtilsConvert()
{
Console.WriteLine(EventType.Tint.ToType()); // RhythmBase.Events.Tint
Console.WriteLine(EventTypeUtils.ToType("Tint")); // RhythmBase.Events.Tint
Console.WriteLine(EventTypeUtils.ToEnum(typeof(Tint))); // Tint
Console.WriteLine(EventTypeUtils.ToEnum<Tint>()); // Tint
Console.WriteLine(string.Join(", ", EventTypeUtils.ToEnums(typeof(IBarBeginningEvent)))); // PlaySong,SetCrotchetsPerBar, SetHeartExplodeVolume
Console.WriteLine(string.Join(", ", EventTypeUtils.ToEnums<IBarBeginningEvent>())); // PlaySong,SetCrotchetsPerBar, SetHeartExplodeVolume
}
[TestMethod]
public void EventTypeUtilsStatic()
{
Console.WriteLine(string.Join(",\n", EventTypeUtils.DecorationTypes));
// Comment,
// CustomDecorationEvent,
// Move,
// PlayAnimation,
// SetVisible,
// Tile,
// Tint
Console.WriteLine(string.Join(",\n", EventTypeUtils.EventTypeEnumsForCameraFX));
// MoveCamera,
// ShakeScreen,
// FlipScreen,
// PulseCamera
Console.WriteLine(string.Join(",\n", EventTypeUtils.EventTypeEnumsForUtility));
// Comment,
// TagAction,
// CallCustomMethod
}
[TestMethod]
public void RichTextUsage()
{
RDLine<RDRichStringStyle> line = RDLine<RDRichStringStyle>.Deserialize("Hel<color=#00FF00>lo");
Console.WriteLine(line.ToString()); // Hello
Console.WriteLine(line.Serialize()); // Hel<color=lime>lo</color>
line +=
new RDPhrase<RDRichStringStyle>(" Rhythm")
{
Style = new()
{
Color = RDColor.Lime
}
};
line += " Doctor!";
Console.WriteLine(line.ToString()); // Hello Rhythm Doctor!
Console.WriteLine(line.Serialize()); // Hel<color=lime>lo Rhythm</color> Doctor!
}
[TestMethod]
public void RichTextModify()
{
RDLine<RDRichStringStyle> line = RDLine<RDRichStringStyle>.Deserialize("Hel<color=#00FF00>lo Rhythm</color> Doctor!");
#if NETCOREAPP
Console.WriteLine(line[6..].ToString()); // Rhythm Doctor!
Console.WriteLine(line[6..].Serialize()); // <color=lime>Rhythm</color> Doctor!
line[5] = " and Welcome to ";
#endif
Console.WriteLine(line.ToString()); // Hello and Welcome to Rhythm Doctor!
Console.WriteLine(line.Serialize()); // Hel<color=lime>lo</color> and Welcome to <color=lime>Rhythm</color> Doctor!
return;
}
[TestMethod]
public void RichTextBuild()
{
RDDialogueExchange exchange =
[
new RDDialogueBlock()
{
Character = "Paige",
Expression = "neutral",
Content = RDLine<RDDialoguePhraseStyle>.Deserialize("Hel<color=#00FF00>lo [2]<shake>Rhythm</color> Doctor</shake>!"),
},
new RDDialogueBlock()
{
Character = "Ian",
Content = "Hello Paige!",
},
new RDDialogueBlock()
{
Character = "Paige",
Expression = "happy",
Content = new RDPhrase<RDDialoguePhraseStyle>("What a good day!")
{
Events =
[
new RDDialogueTone(RDDialogueToneType.VerySlow,6),
new RDDialogueTone(RDDialogueToneType.Static,11),
],
Style = new RDDialoguePhraseStyle()
{
Volume = 0.5f,
Bold = true,
},
}
}
];
Console.WriteLine(exchange.Serialize());
// Paige_neutral:Hel<color=lime>lo [2]<shake>Rhythm</color> Doctor</shake>!
// Ian:Hello Paige!
// Paige_happy:<volume=0.5><bold>What a[vslow] good[static] day!</volume></bold>
}
[TestMethod]
public void EasingCalculate()
{
double var1 = EaseType.InSine.Calculate(0.25);
double var2 = EaseType.Linear.Calculate(0.5, 4, 9);
Console.WriteLine(var1); // 0.07612046748871326
Console.WriteLine(var2); // 6.5
}
[TestMethod]
public void RDCode()
{
RDLang.Variables.i[1] = 9;
RDLang.TryRun("numMistakesP2 = 3", out float result); // 3
Console.WriteLine(result);
RDLang.TryRun("numMistakesP2+i1", out result); // 12
Console.WriteLine(result);
RDLang.TryRun("atLeastRank(A)", out result); // 1
Console.WriteLine(result);
}
[TestMethod]
public void MacroEvents()
{
LevelReadSettings readSettings = new()
{
EnableMacroEvent = true,
InactiveEventsHandling = InactiveEventsHandling.Retain,
};
LevelWriteSettings writeSettings = new()
{
EnableMacroEvent = true,
InactiveEventsHandling = InactiveEventsHandling.Retain,
Indented = true
};
using RDLevel level = RDLevel.Default;
level.Decorations.Add(new Decoration() { Room = RDRoomIndex.Room1 });
MoveCameraRectangle re1 = new MoveCameraRectangle() { Beat = new(4), Size = new RDSize(80, 80) };
MoveCameraRectangle re2 = new MoveCameraRectangle() { Beat = new(9), Y = 2, Size = new RDSize(20, 20) };
level.Add(re1);
level.Add(re2);
string levelJson = level.ToJsonString(settings: writeSettings);
Console.WriteLine(levelJson);
using RDLevel level2 = RDLevel.FromJsonString(levelJson, readSettings);
/* The following events will be generated:
* {"bar":1,"beat":1,"type":"MoveCamera","rooms":[0],"cameraPosition":[10,10],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":1,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[50,50],"duration":0,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":1.001,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[10,10],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":2,"type":"MoveCamera","rooms":[0],"cameraPosition":[90,10],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":2,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[90,10],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":3,"type":"MoveCamera","rooms":[0],"cameraPosition":[90,90],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":3,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[90,90],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":4,"type":"MoveCamera","rooms":[0],"cameraPosition":[10,90],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":4,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[10,90],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000000"},
* {"bar":1,"beat":1,"type":"MoveCamera","rooms":[0],"cameraPosition":[40,40],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":1,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[50,50],"duration":0,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":1.001,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[40,40],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":2,"type":"MoveCamera","rooms":[0],"cameraPosition":[60,40],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":2,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[60,40],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":3,"type":"MoveCamera","rooms":[0],"cameraPosition":[60,60],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":3,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[60,60],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":4,"type":"MoveCamera","rooms":[0],"cameraPosition":[40,60],"duration":1,"ease":"Linear","y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":4,"type":"MoveRow","customPosition":true,"target":"WholeRow","rowPosition":[40,60],"duration":1,"ease":"Linear","row":0,"y":-1,"tag":"$RhythmBase_GroupEvent$0000000000000001"},
* {"bar":1,"beat":1,"type":"Comment","tab":"Song","show":false,"text":"$RhythmBase_GroupData$\r\n\/* Generated by RhythmBase /\r\n@MoveCameraRectangle\r\n@MoveCameraRectangle2\r\n@RhythmBase.RhythmDoctor.Group\r\n@RhythmBase.RhythmDoctor.Group`1\r\n{\"size\":[80.0,80.0],\"rowIndex\":0}\r\n{\"size\":[20.0,20.0],\"rowIndex\":0}\r\n","color":"F2E644","y":-1},
* {"bar":1,"beat":4,"type":"TagAction","Tag":"$RhythmBase_GroupEvent$0000000000000000","y":0,"tag":"","Action":"Run"},
* {"bar":2,"beat":1,"type":"TagAction","Tag":"$RhythmBase_GroupEvent$0000000000000001","y":2,"tag":"","Action":"Run"},
*/
}
public void Example_01()
{
// Read the visual effects level file
using RDLevel vfxLevel = RDLevel.FromFile(@"vfx.rdlevel");
// Read the audio level file
using RDLevel audioLevel = RDLevel.FromFile(@"beat.rdlevel");
// Remove all rows from the visual effects level
Row[] vfxrows = [.. vfxLevel.Rows];
foreach (Row row in vfxrows)
vfxLevel.Rows.Remove(row);
// Copy all rows from the audio level into the new level
foreach (Row row in audioLevel.Rows)
{
// Copy row information
Row row2 = new()
{
Room = row.Room,
Character = row.Character,
Sound = row.Sound,
RowType = row.RowType
};
vfxLevel.Rows.Add(row2);
// Copy events within the row
BaseBeat[] evts = [.. row.OfEvent<BaseBeat>()];
foreach (BaseBeat evt in evts)
row2.Add(evt);
}
// Copy necessary sound events
foreach (IBaseEvent sound in audioLevel.Where(e =>
e.Tab == Tab.Sounds && // Event is in the Sounds tab
e is not BaseRowAction && // Sound events contain row events; adding row events here would cause reference errors
e is not PlaySong && // No need to copy PlaySong if the music is the same
e is not SetCrotchetsPerBar)) // The timing of these events is independent of the number of crotchets per bar, so they don't need to be added
{
vfxLevel.Add(sound);
}
// Write to a new level file
vfxLevel.SaveToFile(@"result.rdlevel");
}
// Create a MyEvent type
// Inherit from CustomEvent
public record class MyEvent : ForwardEvent
{
// Override property
public override Tab Tab => Tab.Actions;
// All implemented properties need to be bound to and checked for null in the ForwardEvent.ExtraData field.
// Implement an RDPointE type property
public RDPointE? MyProperty
{
get
{
// Get the required content from the Data field and check for null
return ExtraData.TryGetValue("myProperty", out JsonElement jsonElement)
? jsonElement.Deserialize<RDPointE>()
: null;
}
set
{
// Save the content in the Data field
ExtraData["myProperty"] =
value.HasValue ?
JsonSerializer.SerializeToElement(value, Utils.GetJsonSerializerOptions(settings: null as LevelWriteSettings)) :
default;
}
}
// Initialize the type in the constructor
public MyEvent()
{
// Initialize the ActualType property.
ActualType = nameof(MyEvent);
}
}
public class GroupData1
{
public RDSize Size { get; set; }
public int RowIndex { get; set; }
}
public record class MoveCameraRectangle : MacroEvent<GroupData1>
{
public RDSize Size
{
get => Data.Size;
set => Data.Size = value;
}
public Row Row
{
get => Rows?[Data.RowIndex] ?? [];
set => Data.RowIndex = value.Index;
}
public MoveCameraRectangle() { }
public override IEnumerable<BaseEvent> GenerateEvents()
{
yield return new MoveCamera() { Beat = new(1), Rooms = new(0), CameraPosition = new(50 - Size.Width / 2, 50 - Size.Height / 2), Duration = 1 };
yield return new MoveCamera() { Beat = new(2), Rooms = new(0), CameraPosition = new(50 + Size.Width / 2, 50 - Size.Height / 2), Duration = 1 };
yield return new MoveCamera() { Beat = new(3), Rooms = new(0), CameraPosition = new(50 + Size.Width / 2, 50 + Size.Height / 2), Duration = 1 };
yield return new MoveCamera() { Beat = new(4), Rooms = new(0), CameraPosition = new(50 - Size.Width / 2, 50 + Size.Height / 2), Duration = 1 };
yield return SetParent(new MoveRow() { Beat = new(1), Position = new(50, 50), EnableCustomPosition = true, Duration = 0 }, Row);
yield return SetParent(new MoveRow() { Beat = new(1.001f), Position = new(50 - Size.Width / 2, 50 - Size.Height / 2), EnableCustomPosition = true, Duration = 1 }, Row);
yield return SetParent(new MoveRow() { Beat = new(2), Position = new(50 + Size.Width / 2, 50 - Size.Height / 2), EnableCustomPosition = true, Duration = 1 }, Row);
yield return SetParent(new MoveRow() { Beat = new(3), Position = new(50 + Size.Width / 2, 50 + Size.Height / 2), EnableCustomPosition = true, Duration = 1 }, Row);
yield return SetParent(new MoveRow() { Beat = new(4), Position = new(50 - Size.Width / 2, 50 + Size.Height / 2), EnableCustomPosition = true, Duration = 1 }, Row);
}
}
}
}