Ejemplo n.º 1
0
 // Change blobs to shrinking state when clicked.
 void OnMouseDown()
 {
     // I added this if statement.
     // I'm not sure this is the best way to check this but it works.
     if (currentState.ToString() != "BlobStateShrinking")
     {
         ChangeState(new BlobStateShrinking(this));
     }
 }
Ejemplo n.º 2
0
 // Change blobs to shrinking state when clicked.
 void OnMouseDown()
 {
     if (!currentState.ToString().Equals("BlobStateShrinking"))
     {
         controller.score += 10;//I make the score to increase when you clicked the blob instead of after the blob fades out
         ChangeState(new BlobStateShrinking(this));
     }
     else
     {
         Debug.Log("already clicked");
     }
 }