def processLogic(self, dt): if self.pause: return ScriptWidget.processLogic(self, dt) if math.fabs( self.t * self.BG_SPEED) >= self.background.width - engine.screenWidth: self.t = 0 self.bgforward = not self.bgforward if self.bgforward: self.background.position = (-self.t * self.BG_SPEED, 0) else: self.background.position = (-self.background.width + engine.screenWidth + self.t * self.BG_SPEED, 0) if not self.ship[self.currentShip].started: self.removeChild(self.ship[self.currentShip]) self.currentShip = (self.currentShip + 1) % 3 self.addChild(self.ship[self.currentShip]) self.ship[self.currentShip].reset() self.ship[self.currentShip].start() self.t = self.t + dt
def processLogic(self, dt): if self.pause: return ScriptWidget.processLogic(self, dt) if math.fabs(self.t * self.BG_SPEED) >= self.background.width - engine.screenWidth: self.t = 0 self.bgforward = not self.bgforward if self.bgforward: self.background.position = (- self.t * self.BG_SPEED, 0) else: self.background.position = (- self.background.width + engine.screenWidth + self.t * self.BG_SPEED, 0) if not self.ship[self.currentShip].started: self.removeChild(self.ship[self.currentShip]) self.currentShip = (self.currentShip + 1) % 3 self.addChild(self.ship[self.currentShip]) self.ship[self.currentShip].reset() self.ship[self.currentShip].start() self.t = self.t + dt
def processLogic(self, dt): ScriptWidget.processLogic(self, dt)
def processLogic(self, dt): ScriptWidget.processLogic(self, dt)