Skip to content

TransparentImageSprite

ColinTree edited this page Oct 11, 2018 · 3 revisions

All properties, methods, events are same with built-in component ImageSprite, except for the following ones:

Properties

  • AA_PlaceHolder
    • type: component type Ball
  • IgnoreColor
    • type: color
  • IgnoreTolerance
    • type: non-negative integer

Usage

  1. Place holder needs to be set

image

  1. Set up properties in the place holder component's list
  2. Set a ignore color & tolerance to TransparentImageSprite
  3. Use it as normal!

About the tolerance

Difference values of the colors are calculated with the followiong method:

  • if alpha values are both 0, difference value will always be 0
  • else Difference value = Max(red-diff, green-diff, blue-diff)

Sample

(.gif file: 220k)

animation

Clone this wiki locally