コード例 #1
0
 def __init__(self, name, beer_id, created_by):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.name = name
     self.beer_id = beer_id
コード例 #2
0
 def __init__(self, duration, beer_id, created_by, id=None):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.id = id
     self.beer_id = beer_id
     self.duration = duration
コード例 #3
0
 def __init__(self, name, image, beer_id, created_by, id=None):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.name = name
     self.image = image
     self.beer_id = beer_id
コード例 #4
0
ファイル: leaf.py プロジェクト: jeremyosborne/ant_cities
 def __init__(self, world):
     
     Entity.__init__(self, world)
     
     # Leaves disappear after a certain number of seconds.
     self.c.add("age", lifespan=120)
     
     self.c.add("inventory", can_be_taken=True)
コード例 #5
0
ファイル: anthill.py プロジェクト: jeremyosborne/ant_cities
    def __init__(self, world, team_id, team_name):
        
        Entity.__init__(self, world)

        self.c.add("team", id=team_id, name=team_name)
        self.c.add("attrs")
        self.c["attrs"].create("energy", val=0, mx=1000)
        self.c.add("inventory")
コード例 #6
0
ファイル: playerStart.py プロジェクト: hesto2/PygameStarter
 def __init__(self,position={"x":0,"y":0}):
     image = pygame.image.load('lib/players/playerStart.png').convert()
     rect = image.get_rect()
     Entity.__init__(self,rect,image)
     self.keyCode = 'ps'
     self.type = C.TYPE_PLAYER_START
     self.rect.left = position['x']
     self.rect.top = position['y']
     self.mass = 2
コード例 #7
0
 def __init__(self, email, borning_date, password_token, po_balance, photo,
              _credits, created_by):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.email = email
     self.borning_date = borning_date
     self.password_token = password_token
     self.positive_balance = po_balance
     self.photo = photo
     self.credits = _credits
コード例 #8
0
    def __init__(self, index, caching=True):
        """Initialize the object.

        :param int index:
            A valid player index.
        :param bool caching:
            Whether to lookup the cache for an existing instance or not.
        :raise ValueError:
            Raised if the index is invalid.
        """
        PlayerMixin.__init__(self, index)
        Entity.__init__(self, index)
コード例 #9
0
 def __init__(self,
              floor,
              tiles,
              x=1,
              y=1,
              char='/',
              color=tcod.gray,
              name="none",
              blocks=True,
              moves=True):
     Entity.__init__(self, tiles, x, y, char, color, name, blocks, moves)
     self.floor = floor
コード例 #10
0
 def __init__(self,
              tiles,
              x=1,
              y=1,
              char='-',
              color=tcod.white,
              name="item",
              blocks=False,
              moves=False,
              deletes=True):
     Entity.__init__(self, tiles, x, y, char, color, name, blocks, moves)
     self.deletes = deletes
コード例 #11
0
 def __init__(self, beer_id, user_id, pay_type_id, climate_id, v_date,
              _token, _qr, pay_product, created_by):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.beer_id = beer_id
     self.user_id = user_id
     self.pay_type_id = pay_type_id
     self.climate_id = climate_id
     self.visit_date = v_date
     self._token = _token
     self.payment_product = pay_product
     self._qr = _qr
コード例 #12
0
 def __init__(self,
              name,
              pint_price,
              cup330_price,
              giraffe_price,
              pitcher_price,
              bar_id,
              beer_type_id,
              avb,
              ibu,
              srm,
              description,
              image,
              pint,
              cup330,
              giraffe,
              pitcher,
              created_by,
              id=None):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.id = id
     self.name = name
     self.pint_price = pint_price
     self.cup330_price = cup330_price
     self.giraffe_price = giraffe_price
     self.pitcher_price = pitcher_price
     self.bar_id = bar_id
     self.beer_type_id = beer_type_id
     self.avb = avb
     self.ibu = ibu
     self.srm = srm
     self.description = description
     self.image = image
     self.pint = pint
     self.cup330 = cup330
     self.giraffe = giraffe
     self.pitcher = pitcher
コード例 #13
0
ファイル: ant.py プロジェクト: jeremyosborne/ant_cities
    def __init__(self, world, base):
        
        Entity.__init__(self, world)
                
        self.brain.add_state(antbrainstates.Exploring())
        self.brain.add_state(antbrainstates.Seeking())
        self.brain.add_state(antbrainstates.Delivering())
        self.brain.add_state(antbrainstates.EnergyDepleted())
        self.brain.add_state(antbrainstates.PowerUp())
        # Default state.
        self.brain.set_state("exploring")
        
        self.c.add("attrs")
        self.c["attrs"].create("energy", val=100)
        self.c["attrs"].create("health", val=100)
        
        self.c.add("facing")
        self.c.add("velocity", max_speed=120., acceleration=30., rotation_speed=180.)
        self.c.add("destination")
        self.c.add("inventory")

        # {Entity} What is our home base.
        self.base = base
コード例 #14
0
 def __init__(self, name, open_date, opening_hour, close_hour, open_days,
              payment_product, description, image, address, points, facebook,
              twitter, instagram, emergency_number, created_by, id=None):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.id = id
     self.name = name
     self.open_date = open_date
     self.opening_hour = opening_hour
     self.close_hour = close_hour
     self.open_days = open_days
     self.payment_product = payment_product
     self.description = description
     self.image = image
     self.description = description
     self.image = image
     self.address = address
     self.points = points
     self.facebook = facebook
     self.twitter = twitter
     self.instagram = instagram
     self.emergency_number = emergency_number
コード例 #15
0
 def __init__(self, title, description, long_description, created_by):
     Entity.__init__(self, created_by)
     self.title = title
     self.description = description
     self.long_description = long_description
コード例 #16
0
 def __init__(self, json, created_by):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.json = json
コード例 #17
0
 def __init__(self, name, created_by):
     """
     Constructor
     """
     Entity.__init__(self, created_by)
     self.name = name