Exemplo n.º 1
0
 public void Clear()
 {
     curentTurnAnimation = null;
     canInput = true;
 }
Exemplo n.º 2
0
 public void OnTurnDone(object sender, TurnEventArgs args)
 {
     curentTurn = args.Turn;
     if (curentTurn.side == Side.Cross)
     {
         curentTurnAnimation = createTurnAnimation(crossFrames, 60, 10);
     }
     else if (curentTurn.side == Side.Zero)
     {
         curentTurnAnimation = createTurnAnimation(zeroFrames, 60, 10);
     }
     curentTurnAnimation.Repeat = false;
 }
Exemplo n.º 3
0
 public override void Update(GameTime gameTime)
 {
     canInput = true;
     if (curentTurnAnimation != null)
     {
         canInput = !curentTurnAnimation.Update(gameTime);
         if (canInput)
         {
             if (TurnAnimationFinished != null)
             {
                 TurnAnimationFinished(this, new EventArgs());
             }
             curentTurnAnimation = null;
         }
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Allows the game component to perform any initialization it needs to before starting
 /// to run.  This is where it can query for any required services and load content.
 /// </summary>
 public override void Initialize()
 {
     crossFrames = content.Load<Texture2D>("animation/cross_animation");
     cross = createTurnAnimation(crossFrames, 60, 10);
     cross.Stop();
     zeroFrames = content.Load<Texture2D>("animation/zero_animation");
     zero = createTurnAnimation(zeroFrames, 60, 10);
     zero.Stop();
     lastCellHighlight = content.Load<Texture2D>("textures/cell_highlight");
 }