Skip to main content
added 223 characters in body
Source Link

You will have to declare an instance of the Stats class within the Death Class to use the methods and properties of the Stats class IE :

Doing this in another class allows you to access the Stats class's methods and properties, make sure the classes are public you are trying to access.

Declare the Stats Class in the Death Class and perform a myStatsClass[Dot] whatever your methods are named in the method that you want to use the Stats class IE in the Death Class Declare :

Stats myStatsClass; 

In the Death Class Method :

public void DeathByThirst()
 {
    myStatsClass.CallStatsClassMethod();
 }

You will have to declare an instance of the Stats class within the Death Class to use the methods and properties of the Stats class IE :

Doing this in another class allows you to access the Stats class's methods and properties, make sure the classes are public you are trying to access.

Stats myStatsClass; 

You will have to declare an instance of the Stats class within the Death Class to use the methods and properties of the Stats class, make sure the classes are public you are trying to access.

Declare the Stats Class in the Death Class and perform a myStatsClass[Dot] whatever your methods are named in the method that you want to use the Stats class IE in the Death Class Declare :

Stats myStatsClass; 

In the Death Class Method :

public void DeathByThirst()
 {
    myStatsClass.CallStatsClassMethod();
 }
Source Link

You will have to declare an instance of the Stats class within the Death Class to use the methods and properties of the Stats class IE :

Doing this in another class allows you to access the Stats class's methods and properties, make sure the classes are public you are trying to access.

Stats myStatsClass;