开发者

iPhone Deck Game Loop

开发者 https://www.devze.com 2023-01-08 02:25 出处:网络
can anyone tell the best approach to run game loop like Uno or Herats (Deck Game) [CPU2 turn]; [CPU3 turn];

can anyone tell the best approach to run game loop like Uno or Herats (Deck Game)

[CPU2 turn];
[CPU3 turn];
[User tur开发者_开发问答n]; // Wait to get user input before proceed to [CPU4 turn]
[CPU4 turn];


Perhaps you could make turns into NSOperation subclass instances placed into an NSOperationQueue, which is set to allow only one concurrent turn/operation. In this case, turns are handled in first-in-first-out (FIFO) order. You can read more about this in Apple's Managing Concurrency document.

0

精彩评论

暂无评论...
验证码 换一张
取 消