I have some doubt about this way of assigning array of enum like in City1.possibleHairColor
. if i define value of enum array at class-member-variable-area is it possible that i will accidentally use value of not yet assigned enum HairColor
in possibleHairColor
?
(in city1 script i want to make a variable that store value of some character hair. while in character.hair color is the full list hair color.)
public class Character
{
public enum HairColor
{
Custom,
Black,
Gray,
Brown,
Red
}
}
public class City1
{
public List<Character.HairColor> possibleHairColor = new()
{
Character.HairColor.Custom,
Character.HairColor.Black,
Character.HairColor.Gray,
//not using brown in this city.
Character.HairColor.Red
};
}