Update meteorshower.py

This commit is contained in:
MrJetz 2022-06-23 20:45:57 +08:00 committed by GitHub
parent 4fec8f41d5
commit 63e70f23c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
# Released under the MIT License. See LICENSE for details.
#
"""Defines a bomb-dodging mini-game."""
# pylint: disable=line-too-long
# ba_meta require api 7
# (see https://ballistica.net/wiki/meta-tag-system)
@ -188,9 +189,9 @@ class MeteorShowerGame(ba.TeamGameActivity[Player, Team]):
# Drop them somewhere within our bounds with velocity pointing
# toward the opposite side.
pos = (-7.3 + 15.3 * random.random(), 11,
-5.5 + 2.1 * random.random())
-5.57 + 2.1 * random.random())
dropdir = (-1.0 if pos[0] > 0 else 1.0)
vel = ((-5.0 + random.random() * 30.0) * dropdir, -4.0, 0)
vel = ((-5.0 + random.random() * 30.0) * dropdir, random.uniform(-3.066, -4.12), 0)
ba.timer(delay, ba.Call(self._drop_bomb, pos, vel))
delay += 0.1
self._set_meteor_timer()