mirror of
https://github.com/n0remac/game-jam-2020.git
synced 2025-12-06 05:13:15 -06:00
screen-projectile deletion fix, comment updates to note TEMP features
This commit is contained in:
@@ -43,7 +43,7 @@ class Config(object):
|
||||
BOTTOM_VIEWPORT_MARGIN = 50
|
||||
TOP_VIEWPORT_MARGIN = 100
|
||||
|
||||
#Bullet constants
|
||||
#Bullet constants TEMP change to speed factor in projectiles.py
|
||||
BULLET_SPEED = 5
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class Game(arcade.Window):
|
||||
"""
|
||||
Called whenever the mouse is clicked.
|
||||
"""
|
||||
# Create a bullet NEED SPRITE, currently wielding frog slingshot
|
||||
# Create a bullet TEMP SPRITE, currently wielding frog slingshot
|
||||
bullet = arcade.Sprite("resources/images/monsters/frog/frog1.png", Config.BULLET_SCALING)
|
||||
|
||||
# Position the bullet at the player's current location
|
||||
@@ -208,8 +208,8 @@ class Game(arcade.Window):
|
||||
if len(hit_list) > 0:
|
||||
bullet.remove_from_sprite_lists()
|
||||
|
||||
# If the bullet flies off-screen, remove it.
|
||||
if bullet.bottom > self.width or bullet.top < 0 or bullet.right < 0 or bullet.left > self.width:
|
||||
# If the bullet flies off-screen, remove it. TEMP change to range calc
|
||||
if bullet.bottom < self.view_bottom or bullet.top > self.view_bottom+Config.SCREEN_HEIGHT or bullet.right > self.view_left+Config.SCREEN_WIDTH or bullet.left < self.view_left:
|
||||
bullet.remove_from_sprite_lists()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user