コード例 #1
0
 void blendItem(BlendItem blenditem)
 {
     if (blenditem.fillAmmount + current_ammount <= max_fill)
     {
         print(mixer.name);
         mixer.addColor(blenditem.blendedColor, blenditem.blendIntensity, blenditem.fillAmmount * timePerPercentage);
         current_ammount += blenditem.fillAmmount;
         fillSprite.transform.localPosition = new Vector3(0, (current_ammount * (max_y_coordinates - min_y_coordinates) / max_fill) + min_y_coordinates, 0);
         Destroy(blenditem.gameObject);
     }
     else
     {
         blenditem.GetComponent <Rigidbody2D>().AddForce(new Vector2(0, 1000));
     }
 }