-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBossPlatform.js
52 lines (46 loc) · 1.07 KB
/
BossPlatform.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
class BossPlatform extends Phaser.GameObjects.Sprite
{
constructor(scene,x,y)
{
super(scene,x,y,"ProjectilBoss");
scene.add.existing(this);
scene.physics.world.enableBody(this);
//
this.body.immovable=true;
this.body.collideWorldBounds=true;
this.body.allowGravity = false;
this.body.setSize(120,120);
}
Patern(collide)
{
if(this.body.y <= 800)
{
this.body.setVelocityY(100);
}
else if(this.body.y >= 1320)
{
this.body.setVelocityY(-100);
}
// mettre l'anims loup assis //
}
/*
BossPlayer(enemy)
{
if(lightning_attack==true)
{
//enemy.anims.play('enemyDie',true);
//enemy.destroy();
enemy.alive=false;
enemyNumberToUnlock++;
}
else
{
if(invincibleTimer >= 150)
{
playerHealth--;
invincibleTimer = 0;
enemy.takeHit = true;
}
}
}*/
}