Pytanie jak w temacie. Jak zadeklarowac takie cos w c#? Da sie?
Powiedzmy ze chce miec klase Player, ktora ma wspolne cechy dla wszystkich instancji (statyczne). Chcialbym to zebrac w strukture tak aby mozliwe bylo np. takie wywolanie:
Player.Settings.StartingHealth = 20;
Player.Settings.Damage = 50;
Player a = new Player();
Player b = new Player();
Gdzie Player jest Klasa a Settings statyczna struktura wspolna dla wszystkich instacji Player. Probowalem szukac w google ale wszystko co dostaje to:
difference between struct and class :(
Moglbym zrobic to tak, ze mam statyczne:
Player.Settings_StartingHealth = 20;
Player.Settings_Damage = 50;
Ale takie cos brzydko wyglada :)