示例#1
0
文件: Game1.cs 项目: AmilKey/AmilKey
        private void HandleGameplayInput(Player player, GameTime gameTime)
        {
            // change UpdateInput to take a Player
            UpdatePlayer(gameTime);

              //  player.Update(gameTime);

            networkSession.Update();

            //base.Update(gameTime);
        }
示例#2
0
文件: Game1.cs 项目: AmilKey/AmilKey
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            LocalPlayer = new Player();
            RemotePlayer = new Player();

            // Set a constant player move speed
            playerMoveSpeed = 8.0f;

            //Enable the FreeDrag gesture.
            TouchPanel.EnabledGestures = GestureType.FreeDrag;

            // Initialize our random number generator
            random = new Random();

            projectiles = new List<Projectile>();

            // Set the laser to fire every quarter second
            fireTime = TimeSpan.FromSeconds(.25f);

              bgLayer1 = new ParallaxingBackground();
               bgLayer2 = new ParallaxingBackground();

            //network

               base.Initialize();

               Components.Add(new GamerServicesComponent(this));
        }