Ejemplo n.º 1
0
class SwordTrail:

	def __init__(self):
		sword = scene.objects['sword_trail']
		woosh = scene.objects['woosh']
		self.active = False
		self.trailEffect = Trail(True, 1, False, "x", False, sword, woosh)
		self.time = 0.0

	def nextFrame(self, max=0.4, speed=0.1):
		if (self.time + speed < max):
			self.time += speed
			return False
		else:
			self.time = 0.0
			return True

	def activeTrail(self):
		if (self.active == False):
			woosh = scene.objects['woosh']
			woosh.setVisible(True)
			self.active = True

	def deactiveTrail(self):
		if (self.active):
			woosh = scene.objects['woosh']
			woosh.setVisible(False)
			self.active = False

	def updateTrail(self):
		self.trailEffect.update()
Ejemplo n.º 2
0
class SwordTrail:
    def __init__(self):
        sword = scene.objects['sword_trail']
        woosh = scene.objects['woosh']
        self.active = False
        self.trailEffect = Trail(True, 1, False, "x", False, sword, woosh)
        self.time = 0.0

    def nextFrame(self, max=0.4, speed=0.1):
        if (self.time + speed < max):
            self.time += speed
            return False
        else:
            self.time = 0.0
            return True

    def activeTrail(self):
        if (self.active == False):
            woosh = scene.objects['woosh']
            woosh.setVisible(True)
            self.active = True

    def deactiveTrail(self):
        if (self.active):
            woosh = scene.objects['woosh']
            woosh.setVisible(False)
            self.active = False

    def updateTrail(self):
        self.trailEffect.update()
Ejemplo n.º 3
0
	def __init__(self):
		sword = scene.objects['sword_trail']
		woosh = scene.objects['woosh']
		self.active = False
		self.trailEffect = Trail(True, 1, False, "x", False, sword, woosh)
		self.time = 0.0
Ejemplo n.º 4
0
 def __init__(self):
     sword = scene.objects['sword_trail']
     woosh = scene.objects['woosh']
     self.active = False
     self.trailEffect = Trail(True, 1, False, "x", False, sword, woosh)
     self.time = 0.0