Example #1
0
 protected ActionLayer(SerializationInfo info, StreamingContext context)
 {
     _action        = info.GetValue(nameof(_action), _action);
     ScriptedEvents = info.GetValue(nameof(ScriptedEvents), ScriptedEvents);
     Events         = info.GetValue(nameof(Events), Events);
     IsMainLayer    = info.GetValue(nameof(IsMainLayer), IsMainLayer);
 }
Example #2
0
 public MoveTarget(SerializationInfo info, StreamingContext context)
 {
     _targetV3 = ((SerializedV3)info.GetValue(nameof(_targetV3), typeof(SerializedV3))).Value;
     _state    = info.GetValue(nameof(_state), _state);
     _targetTr = info.GetValue(nameof(_targetTr), _targetTr);
     _lookTr   = info.GetValue(nameof(_lookTr), _lookTr);
 }
Example #3
0
 public ActionSlot(ActionSlots slotOwner, string type)
 {
     _owner          = new CachedComponent <ActionSlots>(slotOwner);
     Type            = type;
     CompatibleSlots = null;
     CurrentStats    = null;
     RequiredTypes   = new[] { typeof(ActionConfig) };
 }
Example #4
0
 public CurrentActions(int actionsCnt)
 {
     _actions = new CachedComponent <Action> [actionsCnt];
     for (int i = 0; i < _actions.Length; i++)
     {
         _actions[i] = new CachedComponent <Action>();
     }
 }
Example #5
0
 protected override void SetEntity(Entity entity)
 {
     base.SetEntity(entity);
     if (entity != null)
     {
         _collider = new CachedComponent <ColliderComponent>(entity);
     }
 }
Example #6
0
 public EquipmentSlot(EquipmentSlots owner, string targetSlot, string name, Transform equipTr)
 {
     _targetSlot     = targetSlot;
     _equipTr        = new CachedTransform(equipTr);
     Name            = name;
     _slots          = new CachedComponent <EquipmentSlots>(owner);
     CurrentStats    = new List <StatModHolder>();
     CompatibleSlots = new[] { _targetSlot };
 }
Example #7
0
 public EquipmentSlot(SerializationInfo info, StreamingContext context)
 {
     _targetSlot      = info.GetValue(nameof(_targetSlot), _targetSlot);
     _equipTr         = info.GetValue(nameof(_equipTr), _equipTr);
     _item            = info.GetValue(nameof(_item), _item);
     _slots           = info.GetValue(nameof(_slots), _slots);
     _lastEquipStatus = info.GetValue(nameof(_lastEquipStatus), _lastEquipStatus);
     CurrentStats     = info.GetValue(nameof(CurrentStats), CurrentStats);
     CompatibleSlots  = new[] { _targetSlot };
 }
Example #8
0
 public ActionSlot(SerializationInfo info, StreamingContext context)
 {
     Type            = info.GetValue(nameof(Type), Type);
     _cachedItem     = info.GetValue(nameof(_cachedItem), _cachedItem);
     _owner          = info.GetValue(nameof(_owner), _owner);
     _action         = info.GetValue(nameof(_action), _action);
     LastEquipStatus = info.GetValue(nameof(LastEquipStatus), LastEquipStatus);
     CompatibleSlots = null;
     CurrentStats    = null;
     RequiredTypes   = new[] { typeof(ActionConfig) };
 }
Example #9
0
 public Action(SerializationInfo info, StreamingContext context)
 {
     Sequence     = info.GetValue(nameof(Sequence), Sequence);
     Costs        = info.GetValue(nameof(Costs), Costs);
     Range        = info.GetValue(nameof(Range), Range);
     WeaponModel  = info.GetValue(nameof(WeaponModel), WeaponModel);
     Primary      = info.GetValue(nameof(Primary), Primary);
     EquippedSlot = info.GetValue(nameof(EquippedSlot), EquippedSlot);
     _ammo        = info.GetValue(nameof(_ammo), _ammo);
     Fx           = ItemPool.LoadAsset <ActionFx>(info.GetValue(nameof(Fx), ""));
 }
Example #10
0
 protected ActionLayer(Action action)
 {
     _action = new CachedComponent <Action>(action);
 }
Example #11
0
 public CostAmmo(SerializationInfo info, StreamingContext context)
 {
     _ammoComponent = info.GetValue(nameof(_ammoComponent), _ammoComponent);
 }
Example #12
0
 public CostAmmo(AmmoComponent ammoComponent)
 {
     _ammoComponent = new CachedComponent <AmmoComponent>(ammoComponent);
 }