c++ - setScale in cocos2d for a specific time Xcode -
I am trying to scale a phantom when the user gets extra life and it takes 1 or 2 seconds.
I have this:
if (_score == 2) {_life = _life + 1; String strLife = StringHelper :: ToString (_life); _labelUpperLifeCounter-> SetString (strLife); _labelUpperScoreLife- & gt; SetScale (2.5f); }
This is working but I do not know how to set it up:
_labelUpperScoreLife-> setScale (1.7f);
Or better to revive it like 2-3 times pulse before going back to normal ...
Thanks!
I agree that the same is available in C ++. How could I do that obj -c
id scaleUp = [duration with CCActionScale proceedings: .1f scale: 2.5f]; Id break = [ccdictiondeal actionwidth: 1f]; ID scaleBack = [Duration with CCActionScaleAt action: .1f scale: 1.7F]; Id seq = [CCActionSequence actions: scaleUp, pause, scaleback, zero]; [_labelUpperScoreLive Action: seq]; Just common thoughts :) Translation in C ++ is your expertise, it will scale the scale, stall a bit, then scale back to the initial state.
Comments
Post a Comment