Ejemplo n.º 1
0
	def IncreaseOilTotal (self, dur, amount):
		self.SOUNDS['oil'].loop(viz.ON)
		self.SOUNDS['oil'].play()
		score = int(self._score.getMessage())
		oil = int(self._oil.getMessage())
		total = int(self._total.getMessage())
		oilCounter = vizact.mix(oil, oil+amount, time=dur)
		totalCounter = vizact.mix(total, total+score*amount, time=dur)
		self._total.addAction(vizact.call(self.CounterIncrease, self._total, totalCounter))
		self._oil.addAction(vizact.call(self.CounterIncrease, self._oil, oilCounter))
		self._oil.addAction(vizact.call(self.CounterSoundStop))
Ejemplo n.º 2
0
def FallAction():
	"""Flashes screen red and animates blur effect"""

	flash_quad.visible(True)
	flash_quad.color(viz.RED)
	fade_out = vizact.fadeTo(viz.BLACK,time=2.5)
	flash_quad.runAction(vizact.sequence(fade_out,vizact.method.visible(False)))
	flash_quad.runAction(vizact.call(blurEffect.setDistance,vizact.mix(50,0,time=2.5)),pool=1)
Ejemplo n.º 3
0
def FallAction():
	"""Flashes screen red and animates blur effect"""

	flash_quad.visible(True)
	flash_quad.color(viz.RED)
	fade_out = vizact.fadeTo(viz.BLACK,time=2.5)
	flash_quad.runAction(vizact.sequence(fade_out,vizact.method.visible(False)))
	flash_quad.runAction(vizact.call(blurEffect.setDistance,vizact.mix(50,0,time=2.5)),pool=1)
Ejemplo n.º 4
0
def FadeToGrayTask():
    gray_effect.setBlend(0.0)
    gray_effect.setEnabled(True)
    yield viztask.waitCall(gray_effect.setBlend,vizact.mix(0.0,1.0,time=1.0))
Ejemplo n.º 5
0
def FadeToGrayTask():
    gray_effect.setBlend(1)
    gray_effect.setEnabled(True)
    yield viztask.waitCall(gray_effect.setBlend,
                           vizact.mix(viz.BLACK, viz.WHITE, time=1.0))
Ejemplo n.º 6
0
def BlurTask():
    blur_effect.setBlend(0.0)
    blur_effect.setEnabled(True)
    yield viztask.waitCall(blur_effect.setBlend, vizact.mix(0.0, 1.0,
                                                            time=3.0))
    blur_effect.setEnabled(False)
Ejemplo n.º 7
0
def FadeToGrayTask():
    gray_effect.setBlend(0.0)
    gray_effect.setEnabled(True)
    yield viztask.waitCall(gray_effect.setBlend, vizact.mix(0.0, 1.0,
                                                            time=1.0))