-
Notifications
You must be signed in to change notification settings - Fork 0
/
screamer.wlk
78 lines (67 loc) · 2.82 KB
/
screamer.wlk
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import wollok.game.*
import juego2.*
import general.*
object partida3 inherits Partida(
siguientePartida = screamer,
imagenPared = "pared-tierra.png",
personaje = lauti,
imagenManzana = "manzana.png",
objetivoManzanas = 1,
manzanasEnMapa = [],
//ESTE MAPA YA ESTA BIEN
matrizVisuales =[
[ n, n, n, n, n, n, n, n, n, n, pr, pr, pr, n, n, n, n, n], // fila 17
[ n, n, n, n, n, n, n, n, n, n, pr, mn, pr, n, n, n, n, n], // fila 16
[ n, n, n, n, n, n, n, n, n, n, pr, n, pr, n, n, n, n, n], // fila 15
[ n, n, n, n, n, n, n, n, pr, pr, pr, n, pr, n, n, n, n, n], // fila 14
[ n, n, n, n, n, n, pr, pr, pr, n, n, n, pr, n, n, n, n, n], // fila 13
[ n, n, n, n, n, n, pr, n, n, n, pr, pr, pr, n, n, n, n, n], // fila 12
[ n, pr, pr, pr, pr, pr, pr, n, pr, pr, pr, n, n, n, n, n, n, n], // fila 11
[ n, pr, n, n, n, pr, pr, n, pr, n, n, n, n, n, n, n, n, n], // fila 10
[ n, pr, n, pr, n, pr, pr, n, pr, n, n, n, n, n, n, n, n, n], // fila 9
[ n, pr, n, pr, n, pr, pr, n, pr, pr, pr, pr, pr, pr, pr, pr, pr, n], // fila 8
[ n, pr, n, pr, n, n, n, n, pr, pr, n, n, n, n, n, n, pr, n], // fila 7
[ n, pr, n, pr, pr, pr, pr, pr, pr, pr, n, pr, pr, pr, pr, n, pr, pr], // fila 6
[ n, pr, n, n, n, n, n, n, n, n, n, pr, n, n, pr, n, n, pr], // fila 5
[ n, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, n, n, pr, pr, n, pr], // fila 4
[ n, n, n, n, n, n, n, n, n, n, n, n, n, n, pr, n, n, pr], // fila 3
[pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, n, pr, pr], // fila 2
[pr, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, pr, pr], // fila 1
[pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr, pr]],
manzanasActuales = 0){
override method iniciar() {
super()
reloj.iniciar()
game.onTick(500, "reloj", { reloj.restar() })
}
}
object lauti inherits Personaje(posicionInicial = game.at(1,1)) {
override method moverCuerpos(posicionAnteriorCabeza){}
override method reiniciarPersonaje() {
self.position(posicionInicial)
self.imagenAbajo()
reloj.segundos(20)
}
}
object reloj inherits Cosas(x=3, y=14) {
var property segundos = 20
method image() = "reloj.png"
method restar() {
segundos-=1
if(segundos==0){
lauti.reiniciarPersonaje()
segundos = 20
}
game.say(self, "Tenes " + segundos + " segundos")
}
}
object screamer {
method iniciar() {
game.sound("scream.mp3").play()
game.allVisuals().forEach({visual=> game.removeVisual(visual)})
game.addVisual(self)
}
var property position = game.at(0,0)
method image() = "alf1.png"
method reiniciarPersonaje() {}
}