def __init__(self, name=None): if name is None: name = "registrar" Actor.__init__(self, name) return
def __init__(self, name=None): if name is None: name = "registrar" Actor.__init__(self, name) return
def __init__(self, image, laser, position): Actor.__init__(self, image, position, 100) self._laser = laser self._rotationSpeed = 100 #Degrees per second self._fireDurationSec = 0
def __init__(self, image, laser, position): Actor.__init__(self, image, position, 100) self._laser = laser self._rotationSpeed = 100 #Degrees per second self._fireDurationSec = 0
def __init__(self, tree): Actor.__init__(self, "An apple", 0x147514) self.ignoreBlocking = True self.lifetime = 0 self.tree = tree self.edible = True self.hungerValue = 10 self.canPass = True
def __init__(self, x_position, y_position): Actor.__init__(self) self.image = self.spritesheet[0] self.state = GhoulStates.DROPPING self.xvector = 0 (width, height) = self.image.get_size() left = x_position - width / 2 top = y_position - height / 2 self.rect = pygame.Rect(left, top, width, height)
def __init__(self, game, **kwargs): Actor.__init__(self, game, **kwargs) '''self.height = h self.width = w self.x = _x self.y = _y''' self.Disabled = False self.Absolute = True self.focused = False self.Collision = False self.priority = -1
def __init__(self, name, colour = 0x000000): Actor.__init__(self, name, colour) # How many blocks in front can we see? self.los = 5 # Whats our field of view? self.fov = 120 # Ignore these self.path = None self.direction = (1, 0) self.FOVLines = []
def __init__(self,x,y,movespeed): Actor.__init__(self, x, y, movespeed) #self.up() #self.setheading(random.randrange(360)) # self.down() self.newHead = None self.velocity = Vec2D(0, 0) self.vlimit = 2 self.repulsionforce = 2 self.minNieghborDist = 100 self.neighbordist = 1000 self.neighbors = [] SchoolingActor.swarm.append(self)
def __init__(self, name, cash): Actor.__init__(self, cash, name) self.location_on_board = 0 self.sum_of_numbers_rolled_on_dice = 0 self.consecutive_doubles_counter = 0 self.list_of_numbers_rolled = [] self.locations_visited_by_player = [] self.just_visiting_jail = True self.get_out_of_jail_free_card = False # Initially, player does not have the "get out of jail free" card. self.total_number_of_houses_owned = 0 # Initially player owns 0 houses self.total_number_of_hotels_owned = 0 # Initially player owns 0 hotels self.game_board = None self.collectSalary = False self.bank = Bank.Instance() self.playAnotherTurn = False
def __init__(self, x_position, y_position): Actor.__init__(self) self.image = self.spritesheet[0] self.state = GhoulStates.DROPPING self.xvector = 0 self.sprite_loop = lsm.create({ 0: Ghoul.spritesheet[0], 15: Ghoul.spritesheet[1], 30: lsm.end }) (width, height) = self.image.get_size() left = x_position - width / 2 top = y_position - height / 2 self.rect = pygame.Rect(left, top, width, height)
def __init__(self): Actor.__init__(self) self.weapon = None self.armor = None self.accessory = None self.eqItem = [] # player can equip up to 4 usable items to use in battle self.inv_Ar = [] # inventory self.attacks_Ar = [] # associated array for attack string names and attack power values self.currentInput = "" self.currentProb1 = 0 self.currentProb2 = 0 self.currentAnswer = 0 self.fractionSum = 0 self.akhal = 0
def __init__(self): Actor.__init__(self) self.weapon = None self.armor = None self.accessory = None self.eqItem = [ ] #player can equip up to 4 usable items to use in battle self.inv_Ar = [] #inventory self.attacks_Ar = [ ] #associated array for attack string names and attack power values self.currentInput = "" self.currentProb1 = 0 self.currentProb2 = 0 self.currentAnswer = 0 self.fractionSum = 0 self.akhal = 0
def __init__(self, xpos, ypos): Actor.__init__(self) self.image1 = pygame.image.load("assets/bat/bat1.png") self.image2 = pygame.image.load("assets/bat/bat2.png") self.image3 = pygame.image.load("assets/bat/bat3.png") self.image = self.image1 self.hitboxoffset = 0 self.rect = pygame.Rect(xpos+self.hitboxoffset-30/2, ypos-30/2, 30, 50) self.swoop = 120 self.swoop_frame = self.swoop self.swoop_velocity = 5 self.swoop_decay = .1 self.velocity = 0 self.xvector = 0 self.yvector = 0 self.__name__ = "Bat"
def __init__(self, xpos, ypos): Actor.__init__(self) self.image = pygame.image.load("assets/simon/stand.png") self.hitboxoffset = 56 self.rect = pygame.Rect(xpos+self.hitboxoffset, ypos, 32, 61) self.maxhealth = 7 self.health = self.maxhealth self.is_jumping = False self.is_climbing = False self.is_falling = False self.is_attacking = False self.left_jump = False self.right_jump = False self.is_standing = True self.is_big_toss = False self.invul = False self.invul_frame = -1 self.max_invul_frames = 120 self.inputs = [] self.attack = pygame.Rect(0, 0, 0, 0) self.attack_frame = -1 self.attack_size = (50, 15) self.move = 2 self.jump_velocity = 8.0 self.jump_decay = .25 self.velocity = 0 self.sjmod = 1 self.climb_index = -1 self.spritesheet = {} os.chdir("assets/simon") for files in os.listdir("."): if files.endswith(".png"): self.spritesheet[files] = (pygame.image.load (files).convert_alpha()) os.chdir("../..")
def __init__(self, actorJSON): Actor.__init__(self, actorJSON) attributes = { 'spawnTime' : datetime.datetime, 'pluralName' : '', 'is_perm' : False, 'wanderRate' : 0 } for key in attributes.keys(): if self.attributes.has_key(key) == False: self.attributes[key] = attributes[key] if self.attributes['is_perm']: self.attributes['adjective'] = '' else: self.attributes['adjective'] = (lambda char: ((char == 'a' or char == 'e' or char == 'i' or char == 'o' or char == 'u') and 'an') or 'a')(self.attributes['name'].lower()[0]) self.addEventHandlerByNameWithAdjusters('Actor.EventHandlers.NPC.GameTickedHandler', None)
def __init__(self, id): Actor.__init__(self) self.weakness=None self.eqItems_Ar = [] #equipped items self.attacks_Ar = [] #associated array for attack string names and attack power values self.eqItem_Ar = [] self.inv_Ar = [] self.attacks_Ar = [] self.sprite=pygame.sprite.Sprite() self.place=0 #load image based on type later self.name=ENEMY[id]['name'] self.sprite.image=pygame.image.load(CHAR_PATH + ENEMY[id]['img']) self.HP = ENEMY[id]['hp'] self.MHP=ENEMY[id]['hp'] self.ATT = ENEMY[id]['att'] self.weakness=ENEMY[id]['weak'] self.sprite.rect=(200,200,50,300)
def __init__(self, id): Actor.__init__(self) #id = 'a' self.weakness=None self.eqItems_Ar = [] #equipped items self.attacks_Ar = [] #associated array for attack string names and attack power values self.eqItem_Ar = [] self.inv_Ar = [] self.attacks_Ar = [] col,row,width,height = ENEMY[id]['sprite'] self.sprite = DynamicDrawableObject( Spritesheet(CHAR_PATH + ENEMY[id]['img'] ).img_extract(col,row,width,height) , "", 24) self.place=0 self.alive = True #load image based on type later self.name=ENEMY[id]['name'] #self.sprite.image=pygame.image.load(CHAR_PATH + ENEMY[id]['img']) self.HP = ENEMY[id]['hp'] self.MHP=ENEMY[id]['hp'] self.ATT = ENEMY[id]['att'] self.weakness=ENEMY[id]['weak']
def __init__(self, id): Actor.__init__(self) self.weakness = None self.eqItems_Ar = [] #equipped items self.attacks_Ar = [ ] #associated array for attack string names and attack power values self.eqItem_Ar = [] self.inv_Ar = [] self.attacks_Ar = [] self.sprite = pygame.sprite.Sprite() self.place = 0 #load image based on type later self.name = ENEMY[id]['name'] self.sprite.image = pygame.image.load(CHAR_PATH + ENEMY[id]['img']) self.HP = ENEMY[id]['hp'] self.MHP = ENEMY[id]['hp'] self.ATT = ENEMY[id]['att'] self.weakness = ENEMY[id]['weak'] self.sprite.rect = (200, 200, 50, 300)
def __init__(self,player): Actor.__init__(self) self.player=player self.weapon=None self.armor=None self.accessory=None self.eqItem=[] #player can equip up to 4 usable items to use in battle self.inv_Ar = [] #inventory self.attacks_Ar = [] #associated array for attack string names and attack power values self.currentInput="" self.currentProb1=0 self.currentProb2=0 self.currentAnswer=0 self.fractionSum=0 self.akhal=0 amulet=get_item('1') calculator=get_item('s') emptyItem=None self.eqItem=[emptyItem,emptyItem,emptyItem,emptyItem] self.inv_Ar=[amulet,calculator]
def __init__(self, actorJSON): Actor.__init__(self, actorJSON) attributes = { 'spawnTime': datetime.datetime, 'pluralName': '', 'is_perm': False, 'wanderRate': 0 } for key in attributes.keys(): if self.attributes.has_key(key) == False: self.attributes[key] = attributes[key] if self.attributes['is_perm']: self.attributes['adjective'] = '' else: self.attributes['adjective'] = (lambda char: ( (char == 'a' or char == 'e' or char == 'i' or char == 'o' or char == 'u') and 'an') or 'a')( self.attributes['name'].lower()[0]) self.addEventHandlerByNameWithAdjusters( 'Actor.EventHandlers.NPC.GameTickedHandler', None)
def __init__(self, id): Actor.__init__(self) #id = 'a' self.weakness = None self.eqItems_Ar = [] #equipped items self.attacks_Ar = [ ] #associated array for attack string names and attack power values self.eqItem_Ar = [] self.inv_Ar = [] self.attacks_Ar = [] col, row, width, height = ENEMY[id]['sprite'] self.sprite = DynamicDrawableObject( Spritesheet(CHAR_PATH + ENEMY[id]['img']).img_extract( col, row, width, height), "", 24) self.place = 0 self.alive = True #load image based on type later self.name = ENEMY[id]['name'] #self.sprite.image=pygame.image.load(CHAR_PATH + ENEMY[id]['img']) self.HP = ENEMY[id]['hp'] self.MHP = ENEMY[id]['hp'] self.ATT = ENEMY[id]['att'] self.weakness = ENEMY[id]['weak']
def __init__(self, player): Actor.__init__(self) self.player = player self.weapon = None self.armor = None self.accessory = None self.eqItem = [ ] #player can equip up to 4 usable items to use in battle self.inv_Ar = [] #inventory self.attacks_Ar = [ ] #associated array for attack string names and attack power values self.currentInput = "" self.currentProb1 = 0 self.currentProb2 = 0 self.currentAnswer = 0 self.fractionSum = 0 self.akhal = 0 amulet = get_item('1') calculator = get_item('s') emptyItem = None self.eqItem = [emptyItem, emptyItem, emptyItem, emptyItem] self.inv_Ar = [amulet, calculator]
def __init__(self, actorJSON): Actor.__init__(self, actorJSON)
def __init__(self, name): Actor.__init__(self, name) return
def __init__(self, colour = 0x333333): Actor.__init__(self, "A Block", colour) self.ignoreBlocking = True
def __init__(self, name): Actor.__init__(self, name) return
def __init__(self, colour=0x333333): Actor.__init__(self, "A Block", colour) self.ignoreBlocking = True
def __init__(self): Actor.__init__(self, "An apple tree", 0x855D00) self.ignoreBlocking = True self.fruit = {}
def __init__(self, maxVelocity, image, target): Actor.__init__(self, image, (100, 100), maxVelocity) self._target = target
def __init__(self): Actor.__init__(self, "An apple tree", 0x855D00) self.ignoreBlocking = True self.fruit = {}
def __init__(self): Actor.__init__(self)