4
有沒有簡單的方法來灰化精靈?我禁用了一個按鈕,並且我知道如何做到這一點,但是想在GUI中表達這一點。AS3灰色精靈?
有沒有簡單的方法來灰化精靈?我禁用了一個按鈕,並且我知道如何做到這一點,但是想在GUI中表達這一點。AS3灰色精靈?
您可以將ColorMatrixFilter應用於您的Sprite,並使近似值使顏色變爲灰度。
sprite.filters = [ new ColorMatrixFilter([0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0, 0, 0, 1, 0]) ];