rightT is a timer which is supposed to change the image of the object (which inherits
from PictureBox
)
when the code runs (after I turned on the timer) the image changes only once and never changes again
anyone knows why it happens?
rightT.Tick += (EventHandler)delegate
{
this.Location = new Point(this.Location.X + _movementSize,
this.Location.Y); // moves the character
this.Image = this.rightState++ % 2 == 0 ? Properties.Resources.MarioAnimation2 : Properties.Resources.MarioAnimation1; // changes the photo
this.Refresh();
};