如果是Text Sprite,设置其ink时如果又使用了#BackgroundTransparent,而不是其值36,就会使脚本中的blend设置失效。
p_Sprite = channel(p_Config.SpriteNum).makeScriptedSprite(member("fps","common"),point(120,30))
p_Sprite.forecolor = #ffffff
p_Sprite.ink = 36 -- NOTICE! Director BUG:
-- If sprite'member type is #Text, MUST use 36 NOT #backgroundtransparent to set ink property.
-- Otherwise, the #Text sprite's Blend property cannot be manually changed by using Lingo.
p_Sprite.blend = p_Config.Blend
p_Sprite.forecolor = #ffffff
p_Sprite.ink = 36 -- NOTICE! Director BUG:
-- If sprite'member type is #Text, MUST use 36 NOT #backgroundtransparent to set ink property.
-- Otherwise, the #Text sprite's Blend property cannot be manually changed by using Lingo.
p_Sprite.blend = p_Config.Blend
所以说,程序是DEBUUUUUUUUG出来的。
原本以为1小时能搞定的东东,却卡在一个匪夷所思的问题上24小时。