As most people here, apparently, I’m also a bit confused by this lecture. Obviously I’ll keep going and probably all of these concepts will click later.
One of the things that got me confused was the “return” keyword and the need to create a method called GetStateStory. Couldn’t we just access startingState and print the variable storyText? Why the need to complicate and create a method whose only purpose is to go get the variable storyText? Maybe we are obliged to create methods in order to access things in other scripts, I don’t know…
Secondly, the class “State” also confused me a bit, but I’m pretty sure it’s because I’m not familiar with coding. You basically created a variable called “state” that is of type “State”, which apparently means it comes from the public class “State”, which you had created before, from scratch, with the State.cs script. Does this mean that, if I create a new script, I can create a variable of type “AdventureGame”, because I’ve made a public class with that name using the AdventureGame.cs file? I thought that the types of variables were “fixed things” that belonged to the system like bool, int, etc and that you could not create them.