Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. class Entity(object):
  2.     def __init__(self, x, y, char, color, name, entity_type, always_visible=False, blocks=False):
  3.         self.__x = x
  4.         self.__y = y
  5.         self.__char = char
  6.         self.__color = color
  7.         self.__name = name
  8.         self.__entity_type = entity_type
  9.         self.__always_visible = always_visible
  10.         self.__blocks = blocks
  11.  
  12.  
  13. class Actor(Entity):
  14.     def __init__(self, x, y, char, color, name, entity_type, hp, ai=None, always_visible=False, blocks=False):
  15.         super(Actor, self).__init__(x, y, char, color, name, entity_type, always_visible, blocks)
  16.         self.__hp = hp
  17.         self.__ai = ai
  18.  
  19.  
  20. player = Actor(1, 1, '@', "red", "player", "player", 100, blocks=True)
  21.  
  22. print player.__x
  23. print player.__y
  24. print player.__char
  25. print player.__color
  26. print player.__name
  27. print player.__entity_type
  28. print player.__hp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement