예제 #1
0
 internal void DrawPlatforms(SpriteBatch a_spriteBatch, Model.TMXLevel a_level)
 {
     foreach (Model.MovingPlatform platform in a_level.MovingPlatforms.Where(x => x.GetPlatformArea.Intersects(m_camera.GetScreenRectangle)))
     {
         Vector2 position = m_camera.VisualizeCordinates(platform.GetPlatformArea.X, platform.GetPlatformArea.Y);
         a_spriteBatch.Draw(m_platform, position, Color.White);
     }
 }
 //Constructor
 public ItemView(Model.GameModel a_gameModel, Camera a_camera, AnimationSystem a_animationSystem)
 {
     this.m_player          = a_gameModel.Player;
     this.m_level           = a_gameModel.TMXLevel;
     this.m_camera          = a_camera;
     this.m_animationSystem = a_animationSystem;
     this.m_trampolineWatch = new Stopwatch();
 }