camera shake in Y as well (and for less time)
This commit is contained in:
parent
e0d5385350
commit
10c2a86feb
@ -40,13 +40,14 @@ namespace SemiColinGames {
|
|||||||
if (shakeTime > 0) {
|
if (shakeTime > 0) {
|
||||||
shakeTime -= modelTime;
|
shakeTime -= modelTime;
|
||||||
int x = random.Next(-4, 5);
|
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}");
|
Debug.AddToast($"p: {pos.X}, {pos.Y} c: {bbox.Center.X}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shake() {
|
public void Shake() {
|
||||||
shakeTime = 0.5f;
|
shakeTime = 0.3f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user