コード例 #1
0
ファイル: Campaign.cs プロジェクト: jbornemann/Ascian
        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
ファイル: Upgrade.cs プロジェクト: jbornemann/Ascian
        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
ファイル: Ability_Manager.cs プロジェクト: jbornemann/Ascian
 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;
 }