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; }
private void handleInput(InputManager input, InventoryManager wm) { // Allows the game to exit if (input.Exit) this.PopState = true; if (input.SelectUp) { this.Iterator--; } else if (input.SelectDown) { this.Iterator++; } if (input.Confirm) { if (this.Iterator == 0) { //load game ReplaceState = new Level(1, wm); } else if (this.Iterator == 1) { //call method to load settings this.PopState = true; } else if (this.Iterator == 2) { //quit game this.PopState = true; } this.Iterator = 0; } //Add more select menu logic here as menu items increase }
public Gadget(string name, Level level) : this(DataManager.GetData<GadgetData>(name), level) { }
public Gadget(string name, Level level) : this(GadgetDataDict[name], level) { }