예제 #1
0
    public void RandomizeSprites()
    {
        if (spriteVariants.Count == 0)
        {
            Debug.LogError("[Sprite Tools] Sprite Variants have not been set in the inspector");
            return;
        }

        SpriteToolsExtended.RandomizeSprites(GetRenderers(), spriteVariants);
    }
예제 #2
0
 public void ShiftCachedColorsValue()
 {
     SpriteToolsExtended.ShiftColorValue(tints, colorIncrement);
 }
예제 #3
0
 public void GetAndSetSpriteLayer()
 {
     SpriteToolsExtended.SetSpriteSortingLayer(GetRenderers(), targetLayerName);
 }
예제 #4
0
 public void GetAndSetSpriteOrder()
 {
     SpriteToolsExtended.SetSpriteSortingOrder(GetRenderers(), targetSortOrder);
 }
예제 #5
0
 public void GetAndShiftSpriteValues()
 {
     SpriteToolsExtended.ShiftColorValue(GetRenderers(), colorIncrement);
 }
예제 #6
0
    //public void RandomizeSprites() {

    //    int count = spriteRenderers.Count;
    //    for (int i = 0; i < count; i++) {
    //        if (spriteVariants.Count > 0) {
    //            int randomSpriteIndex = Random.Range(0, spriteVariants.Count);
    //            spriteRenderers[i].sprite = spriteVariants[randomSpriteIndex];
    //        }

    //        if (tints.Count > 0) {
    //            int randomColorIndex = Random.Range(0, tints.Count);
    //            spriteRenderers[i].color = tints[randomColorIndex];
    //        }
    //    }
    //}

    //public void ResetSprites() {
    //    int count = spriteRenderers.Count;
    //    for (int i = 0; i < count; i++) {

    //        int randomColorIndex = Random.Range(0, tints.Count);
    //        spriteRenderers[i].color = Color.white;

    //    }
    //}

    public void GetAndColorizeSprites()
    {
        SpriteToolsExtended.Colorize(GetRenderers(), tints);
    }