Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pilas/actores/aceituna.py
blob: 1e49384ddddb1a7abd31ac9ec065e115f3c899c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- encoding: utf-8 -*-
# Pilas engine - A video game framework.
#
# Copyright 2010 - Hugo Ruscitti
# License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
#
# Website - http://www.pilas-engine.com.ar

import pilas
from pilas.actores import Actor

class Aceituna(Actor):

    def __init__(self, x=0, y=0):
        self.cuadro_normal = pilas.imagenes.cargar("aceituna.png")
        self.cuadro_reir = pilas.imagenes.cargar("aceituna_risa.png")
        self.cuadro_burla = pilas.imagenes.cargar("aceituna_burla.png")
        self.cuadro_grita = pilas.imagenes.cargar("aceituna_grita.png")

        Actor.__init__(self, x=x, y=y)
        self.imagen = self.cuadro_normal
        self.centro = ('centro', 'centro')
        self.radio_de_colision = 18

    def normal(self):
        self.imagen = self.cuadro_normal

    def reir(self):
        self.imagen = self.cuadro_reir

    def burlarse(self):
        self.imagen = self.cuadro_burla

    burlar = burlarse

    def gritar(self):
        self.imagen = self.cuadro_grita

    def saltar(self):
        self.hacer(pilas.comportamientos.Saltar())