예제 #1
0
        public Campaign(ref global_vars vars, Player player, Texture2D map, Game1 game)
            : base(game)
        {
            this.variables = vars;
            this.player = player;
            this.map = map;
            this.game = game;
            thisCampaign = this;
            play = this;

            s1 = new Vector2(40, variables.screen_height - 40);
            l1 = new Rectangle(variables.screen_width - 190, variables.screen_height - 70, 50, 50);
            l2 = new Rectangle(variables.screen_width - 130, variables.screen_height - 70, 50, 50);
            l3 = new Rectangle(variables.screen_width - 70, variables.screen_height - 70, 50, 50);

            mapPosition = new Rectangle(0, 0, variables.screen_width, variables.screen_height);
            this.character = this.player.getCharacter(thisCampaign);
            creepers = 0;
            shadows = 0;
        }
예제 #2
0
        public Upgrade(Dictionary<String, Texture2D[]> texPack, Texture2D overlay, Texture2D defaultSelection, Player player, ref global_vars vars, ref Game1 game)
            : base(game)
        {
            this.currentSlot = 0;
            this.texturePack = texPack;
            this.overlay = overlay;
            this.player = player;
            this.variables = vars;
            this.game = game;
            this.defaultSelection = defaultSelection;
            this.selection = defaultSelection;
            thisUpgrade = this;

            pointLoc = variables.PLOC;
            costLoc = variables.CLOC;

            layoverPosition = new Rectangle(0, 0, vars.screen_width, vars.screen_height);
            selectionDelay = new Timer(vars.UPGRADE_DELAY, game);
            selectionDelay.Elapsed = selectDelay;
        }
예제 #3
0
 public static bool abilityIsAvaliable(int ability_number, ref Player player, ref global_vars vars)
 {
     return player.ABILITY[ability_number-1] != vars.NO_ABILITY ? true : false;
 }