How do i get another's elements data from a element in a list?

class Main
{
List<Ent> entis; // Contains EntA and EntB
}
abstract class Ent
{
}

class EntA : Ent
{
int Gold = 100;

// How do i get the EntB class in the entis list from this class?
}
class EntB : Ent
{
float Position = 25.2f;
}
class Main
{
List<Ent> entis; // Contains EntA and EntB
}
abstract class Ent
{
}

class EntA : Ent
{
int Gold = 100;

// How do i get the EntB class in the entis list from this class?
}
class EntB : Ent
{
float Position = 25.2f;
}
1 Reply

Did you find this page helpful?