-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNivelDesierto.js
92 lines (62 loc) · 2.28 KB
/
NivelDesierto.js
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import * as THREE from './libs/three.module.js'
import { Camino } from './Camino.js'
import { Arbusto_desierto } from './Arbusto_desierto.js'
import {Octorok_with_attack} from './Octorok_with_attack.js'
class NivelDesierto extends THREE.Object3D{
constructor(){
super();
this.array_obstaculos = new Array()
this.camino1 = new Camino();
this.camino1.position.z = 2.5
this.camino1.position.x = -86
this.add(this.camino1)
this.camino2 = new Camino();
this.camino2.position.z = -2.5
this.camino2.position.x = -86
this.add(this.camino2)
this.desert_grass = new Arbusto_desierto()
this.add(this.desert_grass)
this.desert_grass.position.x = -130
this.desert_grass.position.z = 5.5
this.desert_grass2 = new Arbusto_desierto()
this.add(this.desert_grass2)
this.desert_grass2.position.x = -100
this.desert_grass2.position.z = 8.5
this.desert_grass3 = new Arbusto_desierto()
this.add(this.desert_grass3)
this.desert_grass3.position.x = -110
this.desert_grass3.position.z = 11.5
this.desert_grass4 = new Arbusto_desierto()
this.add(this.desert_grass4)
this.desert_grass4.position.x = -95
this.desert_grass4.position.z = 20.5
this.array_obstaculos = [
this.camino1, this.camino2, this.desert_grass, this.desert_grass2, this.desert_grass3, this.desert_grass4
]
this.array_enemigos = new Array
//array enemigos
this.octorok = new Octorok_with_attack()
this.name = "Octorok"
this.octorok.position.x = -120
this.octorok.position.z = -3
this.add(this.octorok)
this.octorok2 = new Octorok_with_attack()
this.name = "Octorok2"
this.octorok2.position.x = -125
this.octorok2.position.z = 15
this.add(this.octorok2)
this.array_enemigos = new Array()
this.array_enemigos = [this.octorok2,this.octorok]
}
devolverEnemigos(){
return this.array_enemigos
}
devolverObstaculos(){
return this.array_obstaculos
}
update(){
this.octorok.update()
this.octorok2.update()
}
}
export { NivelDesierto };