ios - SKAction: scaleTo:1.0 duration .01, is there a way to make "duration" any faster/instant? Objective C, Sprite Kit -


i trying duration of skaction down pretty nothing. reason action subtracts users coins, , though .01 pretty fast, still not instant , user cannot make move while coins subtracting. there anyways "instantly" perform skaction?

            nslog(@"subtractusercoinsactivated");             int = user_coins;             int result = - 49;             [self setuserinteractionenabled:false];             __block int dummyscore = a;             skaction* scaleup = [skaction scaleto:1.0 duration:0.01];             skaction* block = [skaction runblock:^{                 dummyscore--;                 _usercoinstext.text = [nsstring stringwithformat:@"%i",dummyscore];                 if(dummyscore == result) {                     [_defaults setinteger:result forkey:@"usercoins"];                     [_defaults synchronize];                     nslog(@"-49 coins");                     [self setuserinteractionenabled:true]; 

if want instant skaction, set duration 0.0 instead of 0.01 .

i time. program in swift, should same in objective-c

e.g. in code right have scale action uses duration of zero

let scale:skaction = skaction.scaleto(0, duration: 0.0) 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -