public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.ACTIVE: if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = (CURRENTFRAME + 1) % 3; } break; case MyStatus.SHOT: CURRENTFRAME = 0; break; case MyStatus.HURT: CURRENTFRAME = 2; PERCENT = Rdn.Next(0, 255); break; case MyStatus.BEFORE_DEATH1: CURRENTFRAME = 2; PERCENT = Rdn.Next(0, 255); scale = new Vector2((float)Rdn.Next(3, 6) / 3, (float)Rdn.Next(3, 6) / 3); break; } }
public override void UpdateAnimate(GameTime mGameTime) { if (TIME.StopWatch(300, mGameTime)) { CURRENTFRAME = (++CURRENTFRAME) % 3; } }
virtual public void UpdateAnimation(GameTime gameTime) { if (TIME.StopWatch(100, gameTime)) { m_CurFrame++; if (m_CurFrame > m_EndFrame) { m_CurFrame = m_StartFrame; } } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.RUN: case MyStatus.ACTIVE: if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = 0; } break; } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.ACTIVE: if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = (CURRENTFRAME + 1) % 3; } break; //case MyStatus.BEFORE_DEATH1: // CURRENTFRAME = 2; // break; } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.ACTIVE: if (mGameTime.TotalGameTime.TotalMilliseconds % 600 < 100) { CURRENTFRAME = 0; } else if (mGameTime.TotalGameTime.TotalMilliseconds % 600 < 200) { CURRENTFRAME = 1; } else if (mGameTime.TotalGameTime.TotalMilliseconds % 600 < 300) { CURRENTFRAME = 2; } else if (mGameTime.TotalGameTime.TotalMilliseconds % 600 < 400) { CURRENTFRAME = 3; } else if (mGameTime.TotalGameTime.TotalMilliseconds % 600 < 500) { CURRENTFRAME = 4; } else { CURRENTFRAME = 5; } break; case MyStatus.START: break; case MyStatus.BEFORE_DEATH1: if (TIME.StopWatch(100, mGameTime)) { //CURRENTFRAME = (CURRENTFRAME + 1) % 6; CURRENTFRAME = (CURRENTFRAME - 2) % 4 + 3; } rota += mGameTime.ElapsedGameTime.Milliseconds; break; } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.ACTIVE: SIZE = new Vector3(26, 26, 0); if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = (CURRENTFRAME + 1) % 4; } break; case MyStatus.BEFORE_DEATH1: SIZE = new Vector3(34, 34, 0); CURRENTFRAME = (CURRENTFRAME - 3) % 6 + 4; break; } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { case MyStatus.ACTIVE: if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = (CURRENTFRAME + 1) % 2; } break; case MyStatus.BEFORE_DEATH1: case MyStatus.STATIC: CURRENTFRAME = 3; break; case MyStatus.RUN: if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = Math.Abs((CURRENTFRAME - 1) % 3) + 2; } break; } }
public override void UpdateAnimate(GameTime mGameTime) { switch (STATUS) { //case MyStatus.UP: //case MyStatus.DOWN: case MyStatus.WIN: case MyStatus.CHANGE: case MyStatus.INVI: case MyStatus.ACTIVE: if (VELOC.X != 0) { if (ACCEL.X * VELOC.X < 0) { CURRENTFRAME = 4; } else { if (TIME.StopWatch(100, mGameTime)) { CURRENTFRAME = (CURRENTFRAME + 1) % 3; } } } else { CURRENTFRAME = 0; } if (VELOC.Y != 0) { CURRENTFRAME = 3; } if (dri * VELOC.X < 0) { dri *= -1; } if (STATUS == MyStatus.INVI || STATUS == MyStatus.CHANGE) { PERCENT = ((Game1)Game).rnd.Next(0, 255); } //if (STATUS == MyStatus.UP || STATUS == MyStatus.DOWN) //{ // scale = new Vector2((float)((Game1)Game).rnd.Next(3, 6) / 3, (float)((Game1)Game).rnd.Next(3, 6) / 3); // PERCENT = ((Game1)Game).rnd.Next(0, 255); //} break; case MyStatus.SHOT: CURRENTFRAME = 2; break; case MyStatus.BEFORE_DEATH1: CURRENTFRAME = 5; break; case MyStatus.UP: case MyStatus.DOWN: CURRENTFRAME = 0; scale = new Vector2((float)((Game1)Game).rnd.Next(3, 6) / 3, (float)((Game1)Game).rnd.Next(3, 6) / 3); PERCENT = ((Game1)Game).rnd.Next(0, 255); break; } }