예제 #1
0
파일: Zune.cs 프로젝트: smarthaert/icgame
 public void Animate(GameTime gameTime)
 {
     if (State != ZuneState.Stop)
     {
         if ((Position.Y >= screenSizeY - Texture.Height && State == ZuneState.Up) || (State == ZuneState.Down && Position.Y <= screenSizeY - 20))
         {
             Position = new Vector2(Position.X, Position.Y + (int)(gameTime.ElapsedGameTime.Milliseconds * 0.5 * (State == ZuneState.Up ? -1 : 1)));
         }
         else
         {
             if (State == ZuneState.Down)
                 Position = new Vector2(Position.X, screenSizeY - 20);
             else
                 Position = new Vector2(Position.X, screenSizeY - Texture.Height);
             State = ZuneState.Stop;
         }
     }
 }
예제 #2
0
파일: Zune.cs 프로젝트: smarthaert/icgame
 /// <summary>
 /// Update po przejściu w tryb fullscreen
 /// </summary>
 /// <param name="screenSizeY">wysokosc ekranu</param>
 public void UpdateScreenSize(int screenSizeY)
 {
     this.screenSizeY = screenSizeY;
     Position = new Vector2(30, screenSizeY - 20);
     State = ZuneState.Stop;
 }
예제 #3
0
파일: Zune.cs 프로젝트: smarthaert/icgame
 public void ToggleOnClick()
 {
     State = IsUp() ? ZuneState.Down : ZuneState.Up;
 }