File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,32 @@ using System.Collections;
27
27
public class ConsoleCommandRouter : MonoBehaviour {
28
28
void Start() {
29
29
var repo = ConsoleCommandsRepository.Instance;
30
+ repo.RegisterCommand("hi", Hi);
30
31
repo.RegisterCommand("save", Save);
31
32
repo.RegisterCommand("load", Load);
32
33
}
33
34
35
+ public string Hi(params string[] args) {
36
+ return "Hey there yourself!";
37
+ }
38
+
34
39
public string Save(params string[] args) {
35
40
var filename = args[0];
36
- new LevelSaver().Save(filename);
41
+
42
+ //
43
+ // [insert code here saving the game to that filename]
44
+ //
45
+
37
46
return "Saved to " + filename;
38
47
}
39
48
40
49
public string Load(params string[] args) {
41
50
var filename = args[0];
42
- new LevelLoader().Load(filename);
51
+
52
+ //
53
+ // [insert code here loading the game from that filename]
54
+ //
55
+
43
56
return "Loaded " + filename;
44
57
}
45
58
}
You can’t perform that action at this time.
0 commit comments