Skip to content

Commit

Permalink
barrierfx
Browse files Browse the repository at this point in the history
  • Loading branch information
hoduc committed Apr 22, 2017
1 parent 36d9745 commit b58cf06
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Assets/Script/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,10 @@ void OnTriggerEnter(Collider other){
//Debug.Log (otherEnt.entityName + ": in here");
if(PowerUp.hasShield && IsAtMaxScale){
otherEnt.Invisiblify(true);
PlayPEAtPosition (otherEnt.onCollidedFX, transform.position);
if(otherEnt.entityName == BARRIER_NAME) {
PlayPEAtPosition( Resources.Load(BRICK_DESTROY_FX_PATH) as GameObject,transform.position);
}
else PlayPEAtPosition (otherEnt.onCollidedFX, transform.position);
return;
}

Expand All @@ -449,16 +452,19 @@ void OnTriggerEnter(Collider other){
if(otherEnt.entityName == BARRIER_NAME) {
PlayPEAtPosition( Resources.Load(BRICK_DESTROY_FX_PATH) as GameObject,transform.position);
}
else if (PowerUp.hasFire) {
Debug.Log ("Dretoy Water FX");
else{
PlayPEAtPosition (otherEnt.onCollidedFX, transform.position);
}
return;
}

//ATMAXSCALE HERE??
if(IsAtMaxScale)
PlayPEAtPosition (otherEnt.onCollidedFX, transform.position);
if(IsAtMaxScale){
if(otherEnt.entityName == BARRIER_NAME) {
PlayPEAtPosition( Resources.Load(BRICK_DESTROY_FX_PATH) as GameObject,transform.position);
}
else PlayPEAtPosition (otherEnt.onCollidedFX, transform.position);
}

if (otherEnt.entityType == ENTITY_TYPE.ENEMY) {
otherEnt.Invisiblify(true);
Expand Down

0 comments on commit b58cf06

Please sign in to comment.