예제 #1
0
 public Boolean CheckCollision(Ground ground)
 {
     return spikeArray [0].Collision (ground.loc, 1000, 1260) ||
     spikeArray [1].Collision (ground.loc, 2000, 2260) ||
     spikeArray [2].Collision (ground.loc, 2400, 2660) ||
     spikeArray [3].Collision (ground.loc, 3050, 3310) ||
     spikeArray [4].Collision (ground.loc, 3800, 4060) ||
     spikeArray [5].Collision (ground.loc, 4500, 4760) ||
     spikeArray [6].Collision (ground.loc, 4950, 5210);
 }
예제 #2
0
        /// <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()
        {
            ground = new Ground ();
            player = new Player (ground);
            level = new Level ();

            collectibleArray = level.Collectibles();
            spikeArray = level.Spikes();

            base.Initialize ();
        }