Пример #1
0
 void OnCollisionEnter2D(Collision2D collosion)
 {
     if (collosion.gameObject.name.Equals("Ball"))
     {
         Debug.Log("collided");
         lastContactPoint = collosion.GetContact(0);
         stopSpeedMultiplier();
         if (ball.IsOnFire)
         {
             resetPlatform();
             instantDefeat();
             collosion.gameObject.SendMessage("RestartGame", 2.0f, SendMessageOptions.RequireReceiver);
         }
         ball.modifySpeed(speedMultiplier);
         ball.setLastPlatformContact(gameObject.name);
         ball.FireUp();
     }
 }