The referenced script on this behavior is missing?

#pragma strict
public function levels() {
var hungerLevel = 10000;
var thirstLevel = 10000;
}
levels.
// states of needs
enum hungerStates { overate, full, satisfied, hungry, starving };
enum thirstStates { overdrank, quenched, satisfied, thirsty, dehydrated };
	// declaring the sub-states

however whenever I try to reference anything in levels() it gives me everything except variables. However, if I make it public then I can’t access levels() at all.
I’m a C# guy so this question may be really basic. Should I use static’s to access variables within function?

Those variables exist within the function, and only within the function. If you want to access them from outside the function you need to have them as class variables declared outside the function.