Property | Type | Description | |
---|---|---|---|
GlisseClips | UnityEngine.AudioClip[] | ||
direction | string | ||
down | GameObject | ||
left | GameObject | ||
moving | bool | ||
nbCoups | int | ||
player | PlayerWalk, | ||
right | GameObject | ||
speed | float | ||
target | Vector3 | ||
time | int | ||
up | GameObject |
Method | Description | |
---|---|---|
OnCollisionEnter2D ( Collision2D collision ) : void |
Is called every time an object is colliding. Help to keep in check the surrounding environment of the block.
|
|
OnCollisionExit2D ( Collision2D collision ) : void |
Is called every time an object doesn't collide anymore. Help to keep in check the surrounding environment of the block.
|
|
OnCollisionStay2D ( Collision2D collision ) : void |
Is called every time an object keeps colliding. Help to keep in check the surrounding environment of the block.
|
|
Start ( ) : void | ||
Update ( ) : void |
Update is called every frame possible and make the block move forward
|
|
annonce_mort ( ) : void |
This function unsets the direction variable of the block's neighbours We need to call it because when we destroy an object, OnCollisionExit isn't called
|
|
fonctBlocDestruction ( ) : void |
It hit the block one time, if nbCoups is egal to 0 then it destroy the block and it unsets the direction variable of his neighbours
|
|
fonctCollisionDestruction ( Collision2D collision ) : void |
It destroy the object it's given in parameter, calls the function to increment score, and unset the good "direction variable"
|
|
fonctCollisionEnter ( Collision2D collision ) : void |
It set an object in the good "direction variable" in order to remember if there was an object next to the block in that direction
|
|
fonctCollisionExit ( Collision2D collision ) : void |
It unset an object in the good "direction variable" in order to remember if there was an object next to the block in that direction
|
|
fonctIncrementScore ( Collision2D collision, int combo ) : void |
This function increment the score of the player, it takes the ennemy score and also check if it's in a combo
|
Method | Description | |
---|---|---|
playSound ( int clipNumber ) : void |
Plays a sound.
|
public OnCollisionEnter2D ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public OnCollisionExit2D ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public OnCollisionStay2D ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public fonctCollisionDestruction ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public fonctCollisionEnter ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public fonctCollisionExit ( Collision2D collision ) : void | ||
collision | Collision2D | |
return | void |
public fonctIncrementScore ( Collision2D collision, int combo ) : void | ||
collision | Collision2D | |
combo | int | |
return | void |
protected playSound ( int clipNumber ) : void | ||
clipNumber | int | Index of the song in the Array of songs |
return | void |
public AudioClip[],UnityEngine GlisseClips | ||
return | UnityEngine.AudioClip[] |