Ejemplo n.º 1
0
        public void Draw(GameTime dt, SpriteBatch spriteB)
        {
            DrawTiles(spriteB);

            foreach (Diamonds diam in diamonds)
            {
                diam.Draw(dt, spriteB);
            }

            foreach (Coins coin in coins)
            {
                coin.Draw(dt, spriteB);
            }

            foreach (HealthPotion health in potions)
            {
                health.Draw(dt, spriteB);
            }

            foreach (Shop shops in shop)
            {
                shops.Draw(dt, spriteB);
            }

            Player.Draw(dt, spriteB);

            foreach (Mage Mages in mages)
            {
                Mages.Draw(dt, spriteB);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets a Mage client from the list of active Mage clients. The client selected is the
        /// one in which the currently logged-in player matches the specified name.
        /// </summary>
        /// <param name="name">The name of the player logged into the client.</param>
        /// <returns>The Mage client that is logged in as the specified player.</returns>

        public MageClient GetMage(string name)
        {
            var client = Mages.FirstOrDefault(x => string.Equals(name, x.Self.Name, StringComparison.OrdinalIgnoreCase));

            if (client == null)
            {
                ThrowNullReferenceException("Mage", name);
            }

            return(client);
        }
Ejemplo n.º 3
0
 private void UpdateMages(GameTime dt)
 {
     foreach (Mage Mages in mages)
     {
         Mages.Update(dt);
         if (Mages.BoundingRect.Intersects(player.BoundingRect) && Player.hasBoughtpowerup)
         {
             //KillMage(Mages);
         }
         else if (Mages.BoundingRect.Intersects(player.BoundingRect) && Player.hasBoughtpowerup == false)
         {
             Kill(Mages);
         }
     }
 }
Ejemplo n.º 4
0
 public void Insert(Mages mages)
 {
     _sqlite_cmd.CommandText = string.Format("INSERT INTO mages (name, versionId) VALUES ('{0}', {1});", mages.Name, mages.VersionId);
     _sqlite_cmd.ExecuteNonQuery();
 }