def update(self): if gcommon.game_timer >= self.removeTime: self.remove() return if self.cnt % 120 == 0: pos = gcommon.mapPosToScreenPos(self.mx, self.my) ObjMgr.addObj(Lift2(pos[0], pos[1], self.dy))
def __init__(self, mx, my, direction, pattern): super(__class__, self).__init__() pos = gcommon.mapPosToScreenPos(mx, my) self.x = pos[0] + 3.5 if direction == -1: self.y = pos[1] + 8 + 12 else: self.y = pos[1] - 12 self.direction = direction # -1:上 1:下 if pattern == 0: self.first = 60 self.length = 120 self.lifeDelta1 = 0.5 self.lifeDelta2 = -0.25 else: self.first = 30 self.length = 80 self.lifeDelta1 = 0.5 self.lifeDelta2 = -0.5 self.ground = True self.layer = gcommon.C_LAYER_GRD self.hitCheck = False self.shotHitCheck = False self.enemyShotCollision = False self.life = 10
def __init__(self, t): super(MovableBattery1, self).__init__() self.mx = t[2] self.my = t[3] pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] + 3.5 self.y = pos[1] + 3.5 self.firstShot = t[4] self.moveTable = t[5] if self.x <= -96 or self.x >= gcommon.SCREEN_MAX_X+96 or self.y <= -96 or self.y >= gcommon.SCREEN_MAX_Y+96: gcommon.debugPrint("MovableBattery1 is ng start point (" + str(self.mx) + ","+ str(self.my) +") (" + str(self.x) + "," + str(self.y)+"") else: ObjMgr.addObj(MovableBattery1p(self.x, self.y, self.firstShot, self.moveTable)) self.remove()
def __init__(self, t): super(Boss2, self).__init__() self.t = gcommon.T_BOSS1 self.isBossRush = t[4] if self.isBossRush: self.x = t[2] self.y = t[3] else: pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] self.y = pos[1] self.left = 16 self.top = 9 self.right = 63 self.bottom = 38 self.hp = 999999 # 破壊できない self.layer = gcommon.C_LAYER_GRD self.ground = True self.score = 7000 self.subcnt = 0 self.dx = 0.5 self.dy = 0 self.hitcolor1 = 3 self.hitcolor2 = 7 self.tblIndex = 0 self.cycleCount = 0 self.brake = False self.feelers = [] self.feelers.append(Feeler(self, 50, 29, 8, 6)) self.feelers.append(Feeler(self, 16, 29, 24, 6)) self.feelers.append(Feeler(self, 16, 8, 40, 6)) self.feelers.append(Feeler(self, 50, 8, 56, 6)) self.feelerShots = [] ObjMgr.addObj(self.feelers[0]) ObjMgr.addObj(self.feelers[1]) ObjMgr.addObj(self.feelers[2]) ObjMgr.addObj(self.feelers[3]) self.bossCells = [] self.timerObj = None if self.isBossRush: self.layer = gcommon.C_LAYER_SKY self.ground = False self.state = 900 self.x = 256 self.y = 81 else: self.bossBase = Boss2Base2(self) ObjMgr.addObj(self.bossBase)
def __init__(self, t): super(__class__, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] self.y = pos[1] self.moveTable = t[4] self.left = 8 self.top = 2 self.right = 15 self.bottom = 23-2 self.layer = gcommon.C_LAYER_GRD self.hp = 200 self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.ground = True self.score = 200 self.mover = CountMover(self, self.moveTable, True)
def __init__(self, t): super(__class__, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] self.y = pos[1] self.size = t[4] # 2以上 self.left = 0 self.top = 0 self.right = 15 self.bottom = 16 * self.size - 1 self.layer = gcommon.C_LAYER_GRD self.exptype = gcommon.C_EXPTYPE_GRD_M self.ground = True self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.hp = 500 self.score = 500
def __init__(self, t): super(__class__, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] + 7.5 self.y = pos[1] + 7.5 self.moveTable = t[4] self.left = -7 self.top = -7 self.right = 7 self.bottom = 7 self.layer = gcommon.C_LAYER_SKY self.hp = 200 self.ground = True self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.score = 300 self.mover = CountMover(self, self.moveTable, False) self.startTimer = str(gcommon.game_timer)
def __init__(self, t): super(Tractor1, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] + 3.5 self.y = pos[1] + 3.5 self.moveTable = t[4] self.left = -11 self.top = -11 self.right = 11 self.bottom = 11 self.layer = gcommon.C_LAYER_GRD self.hp = 50 self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.mover = CountMover(self, self.moveTable, False) self.ground = True self.score = 100 # 貨物車を追加 obj = Freight1(self, 0, 36, 1) ObjMgr.addObj(obj) ObjMgr.addObj(Freight1(obj, 0, 48, 2))
def __init__(self, t): super(ContainerCarrier1, self).__init__() self.mx = t[2] self.my = t[3] pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] + 3.5 self.y = pos[1] + 3.5 self.moveTable = t[4] self.left = -11 self.top = -11 self.right = 11 self.bottom = 11 self.layer = gcommon.C_LAYER_GRD self.hp = 50 self.hitcolor1 = 13 self.hitcolor2 = 15 self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.mover = CountMover(self, self.moveTable, False) self.ground = True self.score = 100
def __init__(self, mx, my, patternNo, startCount, moveNo): super(__class__, self).__init__() pos = gcommon.mapPosToScreenPos(mx, my) self.x = pos[0] self.y = pos[1] self.patternNo = patternNo self.moveNo = moveNo self.startCount = startCount self.left = 2 self.top = 2 self.tablePos = __class__.posTable[patternNo] self.tableSize = __class__.sizeTable[patternNo] self.right = self.tableSize[0] * 8 - 2 self.bottom = self.tableSize[1] * 8 - 2 self.layer = gcommon.C_LAYER_GRD self.hp = gcommon.HP_UNBREAKABLE self.ground = True self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = True self.shotEffect = False self.mover = CountMover(self, __class__.MoveTable[moveNo], False)
def __init__(self, t): super(CellLauncher1, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] self.y = pos[1] self.mirror = t[4] self.first = t[5] * 60 self.left = 8 self.top = 6 self.right = 31 self.bottom = 15 if self.mirror: self.top = 15 - 15 self.bottom = 15 - 6 self.y -= 4 self.layer = gcommon.C_LAYER_SKY self.exptype = gcommon.C_EXPTYPE_GRD_M self.hp = 100 self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.score = 100 self.ground = True
def __init__(self, t): super(PlantBattery2, self).__init__() pos = gcommon.mapPosToScreenPos(t[2], t[3]) self.x = pos[0] self.y = pos[1] self.mirror = t[4] self.firstShot = t[5] self.left = 7 self.top = 3 self.right = 16 self.bottom = 15 if self.mirror == 1: self.top = 23 -15 self.bottom = 23 -3 self.layer = gcommon.C_LAYER_GRD self.hp = 20 self.shotInterval = int(150 / GameSession.enemy_shot_rate) self.hitCheck = True self.shotHitCheck = True self.enemyShotCollision = False self.ground = True self.score = 200 self.state = 0
def createByMapPos(cls, mx, my, hide=False, offsetX=0, offsetY=0): pos = gcommon.mapPosToScreenPos(mx, my) return cls.createByPos(pos[0] + offsetX + 7.5, pos[1] + offsetY + 7.5, hide)
def __init__(self, mx, my, mirror): pos = gcommon.mapPosToScreenPos(mx, my) super(__class__, self).__init__(pos[0], pos[1], mirror) self.imageSourceIndex = 2 self.imageSourceX = 0 self.imageSourceY = 80
def __init__(self, t): pos = gcommon.mapPosToScreenPos(t[2], t[3]) super(ArrowOnMap, self).__init__(pos[0], pos[1], t[4], True, t[5], t[6])