Skip to content

Commit c2fa59c

Browse files
author
Mike Judge
committed
Update README with a better example
1 parent df8581a commit c2fa59c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,32 @@ using System.Collections;
2727
public class ConsoleCommandRouter : MonoBehaviour {
2828
void Start() {
2929
var repo = ConsoleCommandsRepository.Instance;
30+
repo.RegisterCommand("hi", Hi);
3031
repo.RegisterCommand("save", Save);
3132
repo.RegisterCommand("load", Load);
3233
}
3334
35+
public string Hi(params string[] args) {
36+
return "Hey there yourself!";
37+
}
38+
3439
public string Save(params string[] args) {
3540
var filename = args[0];
36-
new LevelSaver().Save(filename);
41+
42+
//
43+
// [insert code here saving the game to that filename]
44+
//
45+
3746
return "Saved to " + filename;
3847
}
3948
4049
public string Load(params string[] args) {
4150
var filename = args[0];
42-
new LevelLoader().Load(filename);
51+
52+
//
53+
// [insert code here loading the game from that filename]
54+
//
55+
4356
return "Loaded " + filename;
4457
}
4558
}

0 commit comments

Comments
 (0)