protected Person() { _ActionFraction = 0.0; _AnimationState = AnimationState.Hidden; _AnimationFraction = 0.0; if (RandomNumberGenerator.GetBoolean() == true) { _LivingSide = LivingSide.Left; } else { _LivingSide = LivingSide.Right; } _Height = RandomNumberGenerator.GetDouble(Data.PersonHeightMean, Data.PersonHeightSpread); _Width = RandomNumberGenerator.GetDouble(Data.PersonWidthMean, Data.PersonWidthSpread); _Name = "Hagen"; }
public override void Load(LoadObjectStore ObjectStore) { base.Load(ObjectStore); _ActionFraction = ObjectStore.LoadDoubleProperty("action-fraction"); _AnimationFraction = ObjectStore.LoadDoubleProperty("animation-fraction"); _AnimationState = ObjectStore.LoadAnimationStateProperty("animation-state"); _ArrivesAtMinute = ObjectStore.LoadUInt64Property("arrives-at-minute"); _ArrivesAtMinuteOfDay = ObjectStore.LoadUInt64Property("arrives-at-minute-of-day"); _AtDesk = ObjectStore.LoadBooleanProperty("at-desk"); _BackgroundColor = ObjectStore.LoadColorProperty("background-color"); _BorderColor = ObjectStore.LoadColorProperty("border-color"); _Desk = ObjectStore.LoadDeskProperty("desk"); _Height = ObjectStore.LoadDoubleProperty("height"); _LeavesAtMinute = ObjectStore.LoadUInt64Property("leaves-at-minute"); _LivingSide = ObjectStore.LoadLivingSideProperty("living-side"); _Name = ObjectStore.LoadStringProperty("name"); _Wage = ObjectStore.LoadUInt64Property("wage"); _Width = ObjectStore.LoadDoubleProperty("width"); _WorkMinutes = ObjectStore.LoadUInt64Property("work-minutes"); _X = ObjectStore.LoadDoubleProperty("x"); _Y = ObjectStore.LoadDoubleProperty("y"); }
public void Save(String PropertyName, LivingSide Value) { _GameSaver.CreateChildElement(_Element, PropertyName, Value.GetType(), Value.ToString()); }