Also I keep getting errors about declaring classes. Let's take a look at that first.
After some work I've made this guide for myself, for creating classes:
static - whether the variables can be changed outside this method?
public - as above?
void / string / int - The variable type to be returned (void seems to be optional for the the first method in the class?
Method name - e.g. Main
(inputted variables) - e.g. (string variableName, int number)
The next problem is being able to use public variables. Can I use them outside of the class they're declared in? I would have thought so.
it seems to be classname.variablename
e.g. monster.health
Aha! I've finally got it working. Will post more later.
No comments:
Post a Comment