Browse Source

make Camera & NPC fields readonly

master
Colin McMillen 4 years ago
parent
commit
127693e2af
  1. 3
      Shared/Camera.cs
  2. 2
      Shared/NPC.cs

3
Shared/Camera.cs

@ -13,8 +13,9 @@ namespace SemiColinGames {
public int Top { get => bbox.Top; }
public Point HalfSize { get => new Point(Width / 2, Height / 2); }
private readonly Random random = new Random();
private float shakeTime = 0.0f;
private Random random = new Random();
public Matrix Projection {
get => Matrix.CreateOrthographicOffCenter(Left, Left + Width, Height, 0, -1, 1);

2
Shared/NPC.cs

@ -52,7 +52,7 @@ namespace SemiColinGames {
private const int spriteCenterYOffset = 2;
private readonly Vector2 eyeOffset = new Vector2(4, -3);
private FSM<NPC> fsm;
private readonly FSM<NPC> fsm;
public NPC(Point position, int facing) {
Position = position;

Loading…
Cancel
Save