Home | Trees | Indices | Help |
---|
|
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 1113 """ 14 Representa un cusor del raton en forma de mano. 15 Cuando se pulsa el boton del ratón la mano cambia a un puño cerrado. 16 17 .. image:: images/actores/mano.png 18 19 """ 206222 """ 23 Constructor del cursor de la mano. 24 25 :param x: posicion horizontal del cursor. 26 :type x: int 27 :param y: posicion vertical del cursor. 28 :type y: int 29 30 """ 31 self._cargar_imagenes() 32 Actor.__init__(self, self.imagen_normal) 33 self.x = x 34 self.y = y 35 36 self.aprender(pilas.habilidades.SeguirAlMouse) 37 pilas.mundo.motor.ocultar_puntero_del_mouse() 38 self.z = -200 39 self.pulsado = False 40 41 self.centro = ("izquierda", "arriba") 42 43 self.escena.mueve_mouse.conectar(self.cuando_mueve_el_mouse) 44 self.escena.click_de_mouse.conectar(self.cuando_pulsa_el_mouse) 45 self.escena.termina_click.conectar(self.cuando_suelta_el_mouse)4648 self.imagen_normal = pilas.imagenes.cargar("cursores/normal.png") 49 self.imagen_arrastrando = pilas.imagenes.cargar("cursores/arrastrando.png")50 53 57
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Jan 27 23:57:24 2013 | http://epydoc.sourceforge.net |