Hello, I know this is a very broad question, but this way I hope to get a lot of answers to choose from. We have a school assignment to create a serious/teaching game. We would like an agenda to be incorporated. Important are:
I think this system could work by using an array, with all assignments in key-value pairs with all data in them, that gets checked every second (or two, or max. five) But I have no clue as where to start about this in Unity.
If anyone has any good ideas to help us get started or knows a way to simplify the process, please let know...
possible key-values I can think of right now would be:
Cheers, and thanks to everyone who's willing to help.
I'm not going to be too much help with the GUI side of things, but as for the code - this sounds like you might be better off creating a Class which represents an assignment. You would then give your class these variables or properties, and add instances of your class to the timetable (unless you're wanting to store this data in a local or remote database, in which case it's a whole different question!).
You should probably also create a Timetable class, which is responsible for containing and modifying the data stored inside. If your system sticks strictly to the 'quantised' 15-minute slot system, you might have an array inside the timetable class, where each discrete cell in the array represents a 15 minute chunk of time. You could then place instances of each assignment object into these cells. An assignment could be placed into more than one cell, and you could add code which ensures they are placed in consecutive cells if that is a requirement.
You should also make sure you're aware of specific custom classes which are designed to store the type of data you're using. Such as DateTime and TimeSpan, and Enums for items like your 'status' variable.
You might be interested in reading an article I wrote which describes the differences between some of the many types of collection available to you in Unity (and Mono in general):
Also, I strongly recommend you consider using the MVC pattern ("Model, View, Controller") to implement this. It's a perfect fit for problems of this nature.
answered Dec 14 '09 at 05:32 PM