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; }
public Gadget(GadgetData data) { MaxEnergy = data.MaxEnergy; Energy = MaxEnergy; if (data.ParticleEffectName != null) _activeParticleEffect = new ParticleEffect(data.ParticleEffectName); }