feature: door basic mechanic
- add Door base class
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
|||||||
|
import pygame
|
||||||
|
|
||||||
|
# using class to be able to reuse it
|
||||||
|
# as we will have multiple rooms to go in
|
||||||
|
class Door:
|
||||||
|
def __init__(self, x, y, hp_value):
|
||||||
|
# for each door we can set our own x/y position
|
||||||
|
self.x = x
|
||||||
|
self.y = y
|
||||||
|
|
||||||
|
self.max_hp = hp_value
|
||||||
|
self.current_hp = hp_value
|
||||||
|
self.is_closed = False
|
||||||
Reference in New Issue
Block a user