diff --git a/CREDITS b/CREDITS index 597a386..d37198c 100644 --- a/CREDITS +++ b/CREDITS @@ -1,7 +1,10 @@ Thanks to OpenGameArt and: - Kay Lousberg for the 2d Guns assets: https://opengameart.org/content/2d-guns 2D_Platformerguy for the music: https://opengameart.org/content/electronic-music-chiptune-3 TinyWorlds for the death sound effect: https://opengameart.org/content/explosion-0 + +The gun icons used in this project are from game-icons.net. +Licensed under the Creative Commons Attribution 3.0 International License (CC BY 3.0): https://creativecommons.org/licenses/by/3.0/ + Huge Thanks to Python for being the programming language used in this game. https://www.python.org/ diff --git a/assets/graphics/assaultrifle.png b/assets/graphics/assaultrifle.png index 8f2bf42..a6fe203 100644 Binary files a/assets/graphics/assaultrifle.png and b/assets/graphics/assaultrifle.png differ diff --git a/assets/graphics/minigun.png b/assets/graphics/minigun.png new file mode 100644 index 0000000..e324b5a Binary files /dev/null and b/assets/graphics/minigun.png differ diff --git a/assets/graphics/pistol.png b/assets/graphics/pistol.png index 510ba06..8a0b759 100644 Binary files a/assets/graphics/pistol.png and b/assets/graphics/pistol.png differ diff --git a/assets/graphics/revolver.png b/assets/graphics/revolver.png index da5bafb..e69de29 100644 Binary files a/assets/graphics/revolver.png and b/assets/graphics/revolver.png differ diff --git a/assets/graphics/smg.png b/assets/graphics/smg.png index 299e533..639da28 100644 Binary files a/assets/graphics/smg.png and b/assets/graphics/smg.png differ diff --git a/assets/graphics/sniper.png b/assets/graphics/sniper.png index 3bb9d90..35aa602 100644 Binary files a/assets/graphics/sniper.png and b/assets/graphics/sniper.png differ diff --git a/game/inventory.py b/game/inventory.py index 0a3644b..c8b919a 100644 --- a/game/inventory.py +++ b/game/inventory.py @@ -1,7 +1,7 @@ from ursina import Entity, Quad, color, camera, held_keys, destroy class Inventory(): - def __init__(self, x=0, y=4.5, width=12, height=1, slots=5): + def __init__(self, x=0, y=4.5, width=1.2, height=0.1, slots=5): self.width = width self.height = height self.x = x @@ -32,9 +32,9 @@ class Inventory(): if key.isnumeric() and int(key) <= self.slot_number: self.switch_to(int(key) - 1) - if key == "scroll up": + if key == "scroll down": self.switch_to(min(self.slot_number - 1, self.current_slot + 1)) - elif key == "scroll down": + elif key == "scroll up": self.switch_to(max(0, self.current_slot - 1)) def create_grid(self): @@ -43,9 +43,9 @@ class Inventory(): parent = camera.ui, model = Quad(radius=.015), texture = 'white_cube', - scale = (self.slot_width * 0.1, self.height * 0.1), - origin = (-slot * (self.slot_width / 2), 0), - position = (-.55, -.4), + scale = (self.slot_width, self.height), + origin = (-slot * (self.slot_width * 7), 0), + position = (-.7, -.4), color = color.gray if slot != self.current_slot else color.white ) @@ -56,9 +56,9 @@ class Inventory(): parent = camera.ui, model = Quad(radius=.015), texture = item, - scale = (self.slot_width * 0.1, self.height * 0.1), - origin = (-slot * (self.slot_width / 2), 0), - position = (-.55, -.4), + scale = (self.slot_width, self.height), + origin = (-slot * (self.slot_width * 7), 0), + position = (-.7, -.4), z=-1, color = color.gray if slot != self.current_slot else color.white ) diff --git a/utils/constants.py b/utils/constants.py index 25159b3..ed0f651 100644 --- a/utils/constants.py +++ b/utils/constants.py @@ -9,6 +9,7 @@ enemy_health = 100 weapons = { "assault_rifle": {"dmg": 20, "atk_speed": 0.2, "image": "assets/graphics/assaultrifle.png"}, "smg": {"dmg": 10, "atk_speed": 0.1, "image": "assets/graphics/smg.png"}, + "minigun": {"dmg": 2, "atk_speed": 0.02, "image": "assets/graphics/minigun.png"}, "pistol": {"dmg": 100 / 3, "atk_speed": 1 / 3, "image": "assets/graphics/pistol.png"}, "revolver": {"dmg": 50, "atk_speed": 1 / 2, "image": "assets/graphics/revolver.png"}, "sniper": {"dmg": 100, "atk_speed": 1, "image": "assets/graphics/sniper.png"},