//Move the window to the bottom of the texture
 public void Begin()
 {
     //move the window down to the bottom of the source image
     //centered on the source image, and with the bottom of the window
     //at the bottom of the image
     //rememeber moving, moves as per the center of the GameObject
     window.MoveTo(new Vector2((float)base.texture.Width / 2.0f,
                               (float)base.texture.Height - (float)viewport.Height / 2.0f));
 }
示例#2
0
        public override void Update(GameTime gameTime)
        {
            //move the default background
            //base.Update(gameTime);

            if (slider != null)
            {
                Offset(new Vector2(0, slider.Step));
            }

            //center the contained item on the background
            content.MoveTo(this.position);
        }
示例#3
0
 public Credits()
 {
     //Setup the background sprite (gameobject)
     background = new GameObject(Textures.TextureName.CreditsBackground);
     background.MoveTo(PROPERTIES.screenCenter);
 }
示例#4
0
 public Instructions()
 {
     background = new GameObject(Textures.TextureName.InstructionsBackground);
     background.MoveTo(PROP.screenCenter);
 }
示例#5
0
 public Options()
 {
     background = new GameObject(Textures.TextureName.OptionsBackground);
     background.MoveTo(PROPERTIES.screenCenter);
 }
示例#6
0
 public Options()
 {
     background = new GameObject(Textures.TextureName.OptionsBackground);
     background.MoveTo(PROPERTIES.screenCenter);
 }
示例#7
0
 public Credits()
 {
     //Setup the background sprite (gameobject)
     background = new GameObject(Textures.TextureName.CreditsBackground);
     background.MoveTo(PROPERTIES.screenCenter);
 }