Example #1
0
File: Egg.cs Project: fiahil/Zappy
 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;
 }
Example #2
0
 public Player(SpriteManager cm, int idTeam)
 {
     this.st = States.IDLE;
     this.pos = new Point(0, 0);
     this.dir = Direction.NORTH;
     this.player = new Sprite[4];
     this.stake = new Sprite[4];
     this.slvl = new Sprite[8];
     this.sfork = new Sprite[4];
     this.sbroadcast = new Sprite[2];
     this.Load(cm, idTeam);
     this.broadcast = null;
     this.broacastTimer = TimeSpan.Zero;
     this.deadTimer = TimeSpan.Zero;
     this.dead = false;
     this.lvl = 1;
     this.iv = new Inventory();
     this.team = "Poney";
 }
Example #3
0
 public Player(SpriteManager cm, int id, int x, int y, Direction dir, int lvl, string team, int idTeam)
 {
     this.st = States.IDLE;
     this.id = id;
     this.pos = new Point(x, y);
     this.dir = dir;
     this.player = new Sprite[4];
     this.stake = new Sprite[4];
     this.slvl = new Sprite[8];
     this.sfork = new Sprite[4];
     this.sbroadcast = new Sprite[2];
     this.team = team;
     this.lvl = (lvl < 1 ? 1 : lvl);
     this.Load(cm, idTeam);
     this.deadTimer = TimeSpan.Zero;
     this.dead = false;
     this.broadcast = null;
     this.broacastTimer = TimeSpan.Zero;
     this.iv = new Inventory();
 }
Example #4
0
File: Elt.cs Project: fiahil/Zappy
        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();
        }
Example #5
0
 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");
 }
Example #6
0
File: Map.cs Project: fiahil/Zappy
        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);
                }
        }
Example #7
0
File: Main.cs Project: fiahil/Zappy
        /// <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.tm_box = sm.GetSprite("Tiles/tm_box");
            this.sf = this.Content.Load<SpriteFont>("Font/Classic");
            this.sf_bc = this.Content.Load<SpriteFont>("Font/Broadcast");
            this.vic = this.Content.Load<SpriteFont>("Font/victory");

            this.map.resizeMap(10, 10);
            #if WINDOWS
            server.Initialize(this);

            if (this.server.IsConnected())
            {
                this.mm = new MusicManager(this.Content);
                this.sounds = new SoundManager(this.Content);
            }
            #endif
        }