public void OnGameLoad(EntityStorage store) { Value = store.ValueOf(nameof(Heal), Value); if (NaturalRegeneration) { _coolDown = store.ValueOf("natural_regeneration", 0f); } }
public Entity Load(EntityStorage store) { Ueid = store.Ueid; X = store.ValueOf("X", X); Y = store.ValueOf("Y", Y); Facing = (Direction)store.ValueOf("Facing", (int)Facing); foreach (var c in Componenents) { if (c is IEntityComponentSaveLoad s) { s.OnGameLoad(store); } } OnLoad(store); return(this); }
public override void OnLoad(EntityStorage store) { Item = ITEMS.ById[store.ValueOf("item", 0)]; SpeedX = store.ValueOf("sx", SpeedX); SpeedY = store.ValueOf("sy", SpeedY); }
public override void OnLoad(EntityStorage store) { Destination = store.ValueOf(nameof(Destination), Destination); GoUp = store.ValueOf(nameof(GoUp), GoUp); }
public void OnGameLoad(EntityStorage store) { Value = store.ValueOf(nameof(Energy), Value); Regeneration = store.ValueOf(nameof(Energy) + nameof(Regeneration), Regeneration); }
public override void OnLoad(EntityStorage store) { _age = store.ValueOf("age", 0f); }
public override void OnLoad(EntityStorage store) { LastLevel = store.ValueOf("level", 0); }
public void OnGameLoad(EntityStorage store) { var item_name = store.ValueOf(nameof(HoldedItem), "null"); HoldedItem = ITEMS.ByName.TryGetValue(item_name, out var item) ? item : null; }