Exemplo n.º 1
0
	def __init__(self, text, position, duration=30, delay=0, continuous=-1, static=False):
		ori  =[[1, 0, 0], [0, 1, 0], [0, 0, 1]]
		StaticEffect.__init__(self, None, position, ori,
								duration, delay, continuous)
		self.fontid = 0
		self.pt_size = 20
		self.color = (1, 1, 1, 1)
		self.text = str(text)
		self.speed = 0 if static else .01
		
		self.static = static
		
		self.position = list(self.position)
Exemplo n.º 2
0
	def __init__(self, visual, position, target, speed=0.2, duration=10000, delay=0, continuous=-1):
		self.start = position
		if isinstance(target, mathutils.Vector):
			ori = target-position
		else:
			ori = target.object.position - position
			
		StaticEffect.__init__(self, visual, position, ori, duration, delay, continuous)
		
		self.target = target
		self.target_position = mathutils.Vector((0, 0, 0))
		self.speed = speed
		
		self.obj = None
		self.f_collision = None
Exemplo n.º 3
0
	def get_info(self):
		info =StaticEffect.get_info(self)
		
		info['type'] = "ProjectileEffect"
		info['speed'] = self.speed
		info['position'] = self.start.to_tuple()
		
		del info['orientation']
		
		return info
Exemplo n.º 4
0
	def _unload(self, engine):
		StaticEffect._unload(self, engine)
Exemplo n.º 5
0
	def _fire(self, engine):
		return StaticEffect._fire(self, engine)