Exemplo n.º 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;
 }
Exemplo n.º 2
0
        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
        }
Exemplo n.º 3
0
 public Gadget(string name, Level level)
     : this(DataManager.GetData<GadgetData>(name), level)
 {
 }
Exemplo n.º 4
0
 public Gadget(string name, Level level)
     : this(GadgetDataDict[name], level)
 {
 }