Browse Source

camera shake in Y as well (and for less time)

master
Colin McMillen 4 years ago
parent
commit
10c2a86feb
  1. 5
      Shared/Camera.cs

5
Shared/Camera.cs

@ -40,13 +40,14 @@ namespace SemiColinGames {
if (shakeTime > 0) {
shakeTime -= modelTime;
int x = random.Next(-4, 5);
bbox.Offset(x, 0);
int y = random.Next(-4, 5);
bbox.Offset(x, y);
}
Debug.AddToast($"p: {pos.X}, {pos.Y} c: {bbox.Center.X}");
}
public void Shake() {
shakeTime = 0.5f;
shakeTime = 0.3f;
}
}
}
Loading…
Cancel
Save