private void ChangeRunningFrames() { if (runningFrames == RunningFrames.FirstFrame) { runningFrames = RunningFrames.LastFrame; RunningRect = new Rectangle(0, 0, RunningTexture.Width / 2, RunningTexture.Height); } else { runningFrames = RunningFrames.FirstFrame; RunningRect = new Rectangle(RunningTexture.Width / 2, 0, RunningTexture.Width / 2, RunningTexture.Height); } }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Window.Title = "T Rex Runner"; IsMouseVisible = false; MainForm = (Form)Control.FromHandle(Window.Handle); score = 0; drawAction = DrawAction.Crouch; runningFrames = RunningFrames.FirstFrame; crouchingFrames = CrouchingFrames.FirstFrame; }