iOS Sprite Kit why can't I repeat colorizeWithColor using white color?

后端 未结 2 2023
滥情空心
滥情空心 2021-02-20 13:26

I\'m experimenting with ways of selecting sprite nodes using methods other than scale. The one method that I like the most is colorize with white, which highlights the node visi

2条回答
  •  误落风尘
    2021-02-20 14:02

    This is very interesting - and I'm not sure I have the answer. Using a white colorisation does to affect a node differently from other colours.

    if you perform a colorize on a sprite node with blueColor and watch in the simulator, the colour will remain.

    [node runAction:[SKAction colorizeWithColor:[SKColor blueColor] colorBlendFactor:0.8 duration:0.6]];
    

    However, if you perform a colorize on a sprite node with whiteColor and watch in the simulator, it appears to automatically unwind (even without any completion block).

    [node runAction:[SKAction colorizeWithColor:[SKColor whiteColor] colorBlendFactor:0.8 duration:0.6]];
    

    I can find no reference to why this might be the case in documentation/header files. Still searching.

提交回复
热议问题