Package pilas :: Package actores :: Module cursordisparo
[hide private]
[frames] | no frames]

Source Code for Module pilas.actores.cursordisparo

 1  # -*- encoding: utf-8 -*- 
 2  # Pilas engine - A video game framework. 
 3  # 
 4  # Copyright 2010 - Hugo Ruscitti 
 5  # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) 
 6  # 
 7  # Website - http://www.pilas-engine.com.ar 
 8   
 9  from pilas.actores import Actor 
10  import pilas 
11   
12 -class CursorDisparo(Actor):
13 """ Representa un cursor con una cruz roja.""" 14
15 - def __init__(self, x=0, y=0):
16 """ Constructor del CursorDisparo 17 18 :param x: Posición horizontal del cursor. 19 :type x: int 20 :param y: Posición vertical del cursor. 21 :type y: int 22 """ 23 imagen = pilas.imagenes.cargar('cursordisparo.png') 24 Actor.__init__(self, imagen) 25 self.rotacion = 0 26 self.x = x 27 self.y = y 28 self.radio_de_colision = 25 29 30 self.aprender(pilas.habilidades.SeguirAlMouse) 31 pilas.mundo.motor.ocultar_puntero_del_mouse()
32