GitOrigin-RevId: 3c4e116e77
3c4e116e77
@ -3,7 +3,7 @@ using System;
// Good background reading, eventually:
// https://gamasutra.com/blogs/ItayKeren/20150511/243083/Scroll_Back_The_Theory_and_Practice_of_Cameras_in_SideScrollers.php
namespace Jumpy {
namespace SemiColinGames {
class Camera {
private Rectangle bbox = new Rectangle(0, 0, 1920 / 4, 1080 / 4);
@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
static class Debug {
struct DebugRect {
public Rectangle rect;
@ -1,6 +1,6 @@
using System;
class FpsCounter {
private double fps = 0;
private int[] frameTimes = new int[60];
// A History is a queue of fixed length N that records the N most recent items Add()ed to it.
// The mostly-recently-added item is found at index 0; the least-recently-added item is at index
// N-1. Items older than the History's size are automatically dropped. The underlying
using Microsoft.Xna.Framework;
public interface IDisplay {
void Initialize(GameWindow window, GraphicsDeviceManager graphics);
void SetFullScreen(bool fullScreen);
@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Input;
using System;
public class JumpyGame : Game {
GraphicsDeviceManager graphics;
@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Input;
public class KeyboardInput {
private KeyboardState oldState = Keyboard.GetState();
private List<Keys> newKeysDown = new List<Keys>();
@ -4,7 +4,7 @@ using Microsoft.Xna.Framework.Input;
class Player {
enum Facing { Left, Right };
enum Pose { Walking, Standing, Crouching, Stretching, SwordSwing, Jumping };
@ -3,7 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
enum Terrain {
Empty,
Grass,