Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into Create-Gun-Object
  • Loading branch information
Christopher Parks committed May 29, 2021
2 parents 67ca167 + 2cbd4b7 commit bb30112
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Binary file added .vs/byte_le_royale_2022/v16/.suo
Binary file not shown.
Empty file added game/common/items/__init__.py
Empty file.
15 changes: 15 additions & 0 deletions game/common/items/item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from game.common.map_object import MapObject

class Item(MapObject):
def __init__(self, coordinates, hitbox, health=None, count = 1):
super().__init__(health, coordinates, hitbox, True)
self.count = count

def to_json(self):
data = super().to_json()
data['count'] = self.count
return data

def from_json(self, data):
super().from_json(data)
self.count = data['count']

0 comments on commit bb30112

Please sign in to comment.