示例#1
0
 public void OnGameLoad(EntityStorage store)
 {
     Value = store.ValueOf(nameof(Heal), Value);
     if (NaturalRegeneration)
     {
         _coolDown = store.ValueOf("natural_regeneration", 0f);
     }
 }
示例#2
0
        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);
        }
示例#3
0
 public override void OnLoad(EntityStorage store)
 {
     Item   = ITEMS.ById[store.ValueOf("item", 0)];
     SpeedX = store.ValueOf("sx", SpeedX);
     SpeedY = store.ValueOf("sy", SpeedY);
 }
示例#4
0
 public override void OnLoad(EntityStorage store)
 {
     Destination = store.ValueOf(nameof(Destination), Destination);
     GoUp        = store.ValueOf(nameof(GoUp), GoUp);
 }
示例#5
0
 public void OnGameLoad(EntityStorage store)
 {
     Value        = store.ValueOf(nameof(Energy), Value);
     Regeneration = store.ValueOf(nameof(Energy) + nameof(Regeneration), Regeneration);
 }
示例#6
0
文件: TNT.cs 项目: krisz2000/hevadea
 public override void OnLoad(EntityStorage store)
 {
     _age = store.ValueOf("age", 0f);
 }
示例#7
0
 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;
        }