I am trying to create a few nested classes within my main class.
public class MyPlayer : Player
{
public bool TargetEnemy()
{
return true;
}
public class Movement
{
public uint aInt = 1;
public TurnLeft()
{
}
}
public class ActionBar
{
}
}
I have many different classes so that I would be able to access the MyPlayer class through out the code without passing it to all them I just created a static class that holds the variable for it. I am able to access the MyPlayer->Movement using Main.Units.MyPlayer.Movement but this is not linked to the MyPlayer instance I have defined in the static class.
I want to be able to do MyPlayer->Movement->TurnLeft() for example. How would I achieve this? Thanks for your answers.
multiple-inheritanceis a totally different thing (and doesn't exist in.Net) I removed that tag.