File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed
Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ public class Program : GameLoop
1414 // for every object you want to save
1515 // its best to nest save objects to not create ALOT of files
1616 Gb .RegisterSaveItem (obj , " file name" );
17-
18- // to load:
19- Gb .LoadItems ();
20-
21- // to save:
22- Gb .SaveItem ();
2317 }
2418
2519 public override void UpdateLoop ()
@@ -32,7 +26,18 @@ public class Program : GameLoop
3226}
3327```
3428
35- adding encryption is very easy to ad
29+ to save/load items do:
30+ make sure to execute AFTER the save items are registered in the init
31+
32+ ``` c#
33+ // load
34+ Gb .LoadItems ();
35+
36+ // save
37+ Gb .SaveItem ();
38+ ```
39+
40+ adding encryption is very easy to add
3641you should put this before the init of gamebox if you want to set
3742the encryption
3843
Original file line number Diff line number Diff line change 1+ the scheduler system is a very powerful system
2+
3+ schedulers are for timing events
4+
5+ it is very easy to add a scheduler, however you should use low ms times with caution
6+
7+ ``` c#
8+ GameBox .Gb .AddScheduler (new Scheduler (timeInMsToRepeat , onTime : () => {
9+ // what you want to happpen when it repeats
10+ }, setTime : true by default
11+ /* if set time is false then the scheduler will execute the onTime event on Init*/ ))
12+ ```
13+
14+ the reason you should caution about low timeInMsToRepeat times is because it might not be fast enough to hit it again
15+
16+ it is recommended to go above 50
You can’t perform that action at this time.
0 commit comments