public Egg(SpriteManager cm,int id, int x, int y) { pos = new Point(x, y); this.id = id; this.egg = cm.GetSprite("Players/Egg"); this.st = States.IDLE; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); this.sm = new SpriteManager(this.Content); this.inventory_page = sm.GetSprite("Tiles/map_inventory"); this.team_detail = sm.GetSprite("Tiles/team_detail"); this.bc_box = sm.GetSprite("Tiles/bc_box"); this.sf = this.Content.Load<SpriteFont>("Font/Classic"); this.sf_bc = this.Content.Load<SpriteFont>("Font/Broadcast"); this.map.resizeMap(10, 7); server.Initialize(this); }
public void Load(SpriteManager sm, int teamId) { if ((teamId % 2) == 0) { this.player[0] = sm.GetSprite("Players/BR"); this.player[1] = sm.GetSprite("Players/FR"); this.player[2] = sm.GetSprite("Players/FL"); this.player[3] = sm.GetSprite("Players/BL"); this.stake[0] = sm.GetSprite("Players/BR_prend"); this.stake[1] = sm.GetSprite("Players/FR_prend"); this.stake[2] = sm.GetSprite("Players/FL_prend"); this.stake[3] = sm.GetSprite("Players/BL_prend"); this.sfork[0] = sm.GetSprite("Players/BR_fork"); this.sfork[1] = sm.GetSprite("Players/FR_fork"); this.sfork[2] = sm.GetSprite("Players/FL_fork"); this.sfork[3] = sm.GetSprite("Players/BL_fork"); this.sincant = sm.GetSprite("Players/incant"); } else { this.player[0] = sm.GetSprite("Players/BR_2"); this.player[1] = sm.GetSprite("Players/FR_2"); this.player[2] = sm.GetSprite("Players/FL_2"); this.player[3] = sm.GetSprite("Players/BL_2"); this.stake[0] = sm.GetSprite("Players/BR_prend_2"); this.stake[1] = sm.GetSprite("Players/FR_prend_2"); this.stake[2] = sm.GetSprite("Players/FL_prend_2"); this.stake[3] = sm.GetSprite("Players/BL_prend_2"); this.sfork[0] = sm.GetSprite("Players/BR_fork_2"); this.sfork[1] = sm.GetSprite("Players/FR_fork_2"); this.sfork[2] = sm.GetSprite("Players/FL_fork_2"); this.sfork[3] = sm.GetSprite("Players/BL_fork_2"); this.sincant = sm.GetSprite("Players/incant_2"); } this.slvl[0] = sm.GetSprite("Level/level_1"); this.slvl[1] = sm.GetSprite("Level/level_2"); this.slvl[2] = sm.GetSprite("Level/level_3"); this.slvl[3] = sm.GetSprite("Level/level_4"); this.slvl[4] = sm.GetSprite("Level/level_5"); this.slvl[5] = sm.GetSprite("Level/level_6"); this.slvl[6] = sm.GetSprite("Level/level_7"); this.slvl[7] = sm.GetSprite("Level/level_8"); this.sdead = sm.GetSprite("Players/dead"); this.sbroadcast[0] = sm.GetSprite("Players/BroadcastL"); this.sbroadcast[1] = sm.GetSprite("Players/BroadcastR"); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); // Définir le mode de partage de la carte graphique pour activer le partage du rendu XNA SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); // Créer un SpriteBatch, qui peut être utilisé pour dessiner des textures. spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); // TODO: utilisez this.Content pour charger votre contenu de jeu ici this.sm = new SpriteManager(this.contentManager); this.inventory_page = sm.GetSprite("Tiles/map_inventory"); this.team_detail = sm.GetSprite("Tiles/team_detail"); this.bc_box = sm.GetSprite("Tiles/bc_box"); this.tm_box = sm.GetSprite("Tiles/tm_box"); this.sf = this.contentManager.Load<SpriteFont>("Font/Classic"); this.sf_bc = this.contentManager.Load<SpriteFont>("Font/Broadcast"); this.vic = this.contentManager.Load<SpriteFont>("Font/victory"); //this.map.resizeMap(10, 10); server.Initialize(this); if (!server.IsConnected()) { MessageBox.Show("Connection Error", server.Error(), MessageBoxButton.OK); this.NavigationService.GoBack(); } // Démarrer le minuteur timer.Start(); }
public void Load(SpriteManager cm) { this.tiles[0] = cm.GetSprite("Tiles/base1"); this.tiles[1] = cm.GetSprite("Tiles/base2"); this.tiles[2] = cm.GetSprite("Tiles/base3"); this.nourriture[0] = cm.GetSprite("Resources/nourriture_small"); this.nourriture[1] = cm.GetSprite("Resources/nourriture_big"); this.linemate[0] = cm.GetSprite("Resources/linemate_small"); this.linemate[1] = cm.GetSprite("Resources/linemate_big"); this.deraumere[0] = cm.GetSprite("Resources/deraumere_small"); this.deraumere[1] = cm.GetSprite("Resources/deraumere_big"); this.sibur[0] = cm.GetSprite("Resources/sibur_small"); this.sibur[1] = cm.GetSprite("Resources/sibur_big"); this.mendiane[0] = cm.GetSprite("Resources/mendiane_small"); this.mendiane[1] = cm.GetSprite("Resources/mendiane_big"); this.phiras[0] = cm.GetSprite("Resources/phiras_small"); this.phiras[1] = cm.GetSprite("Resources/phiras_big"); this.thystame[0] = cm.GetSprite("Resources/thystame_small"); this.thystame[1] = cm.GetSprite("Resources/thystame_big"); this.marker = cm.GetSprite("Tiles/base_highlited"); this.Bounds = tiles[0].getBounds(); }
public void Load(SpriteManager cm, SpriteBatch sb, SpriteFont sf) { this.sb = sb; this.square_details = cm.GetSprite("Tiles/map_resources"); this.sf = sf; this._wall[0] = cm.GetSprite("Background/wall"); this._wall[1] = cm.GetSprite("Background/wall2"); this._wall[2] = cm.GetSprite("Background/wall3"); this._wall[3] = cm.GetSprite("Background/cloud"); this._wall[4] = cm.GetSprite("Background/border"); this._wall[5] = cm.GetSprite("Background/border2"); this._wall[6] = cm.GetSprite("Background/top_border"); this._wall[7] = cm.GetSprite("Background/top_border2"); this._wall[8] = cm.GetSprite("Background/corner"); for (int i = 0; i < this.dim.X; ++i) for (int j = 0; j < this.dim.Y; ++j) { this.map[i, j] = new Elt(sb, new Point(i, j)); this.map[i, j].Load(cm); } TouchPanel.EnabledGestures = GestureType.FreeDrag | GestureType.Tap | GestureType.DoubleTap; }