示例#1
0
 protected Gadget(GadgetData data, Level level)
 {
     _energy = c_maxGadgetEnergy;
     _energyConsumption = data.EnergyConsumption;
     _gadgetAction = Delegate.CreateDelegate(typeof(GadgetAction), level, data.Action) as GadgetAction;
     _immediate = data.Immediate;
 }
示例#2
0
 protected Gadget(GadgetData data, Level level)
 {
     _energy = c_maxGadgetEnergy;
     _energyConsumption = data.EnergyConsumption;
     _gadgetAction = Delegate.CreateDelegate(typeof(GadgetAction), level, data.Action) as GadgetAction;
     _immediate = data.Immediate;
 }
示例#3
0
 public Gadget(GadgetData data)
 {
     MaxEnergy = data.MaxEnergy;
     Energy = MaxEnergy;
     if (data.ParticleEffectName != null)
         _activeParticleEffect = new ParticleEffect(data.ParticleEffectName);
 }