- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
if (starsCounter == 1)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
}
else if (starsCounter == 2)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(260, 190) z:1 tag:1];
}
else if (starsCounter == 3)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(260, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(270, 190) z:1 tag:1];
}
else if (starsCounter == 4)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(260, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(270, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(280, 190) z:1 tag:1];
}
else if (starsCounter == 5)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(260, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(270, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(280, 190) z:1 tag:1];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(290, 190) z:1 tag:1];
}
guest 24.05.2011 13:09 # +1
for(int i =0; i < starsCounter; i++)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(pointX , 190) z:1 tag:1];
pointX = pointX + 10;
}
не?
Chippman 24.05.2011 13:12 # 0
guest 16.08.2011 18:41 # 0
for (int i = 0; i < starsCounter < 6 ? starsCounter : 0 ; i++)
{
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png"
point:ccp(240 + 10 * i , 190) z:1 tag:1];
}
JeremyW 24.05.2011 15:06 # −2
JeremyW 24.05.2011 15:11 # +3
{
case 5: [DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(290, 190) z:1 tag:1];
case 4: [DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(280, 190) z:1 tag:1];
case 3: [DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(270, 190) z:1 tag:1];
case 2: [DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(260, 190) z:1 tag:1];
case 1: [DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250, 190) z:1 tag:1];
}
:)
Chippman 24.05.2011 15:45 # −5
JeremyW 24.05.2011 19:15 # +3
guest 24.05.2011 19:57 # +1
JeremyW 24.05.2011 20:09 # −3
истинным Джедаям - похуй...
JeremyW 24.05.2011 21:09 # 0
Захотелось ему небо нарисовать из 5000000 звёзд, а ему "Stack Overflow'ом" по *балу на.
И мы не будем обращать на то, что произойдет при count = 0...
Истинный Джедай должен оставить след после себя.
guest 24.05.2011 22:38 # +3
- (void) starDrawer: (NSInteger) count {
if( count > 0) {
[self starDrawer: --count];
[DCObjects drawSpriteFromBatch:bg name:@"star-little.png" point:ccp(250 + (count-1) * 10, 190) z:1 tag:1];
}
}
guest 24.05.2011 22:42 # +3
TarasB 25.05.2011 10:55 # 0
guest 25.05.2011 11:31 # 0
TarasB 25.05.2011 11:47 # 0
guest 25.05.2011 12:28 # 0
gegMOPO4 08.06.2011 20:07 # 0
TarasB 25.05.2011 10:54 # 0
Lure Of Chaos 24.05.2011 17:02 # 0
Govnocoder#0xFF 16.06.2011 17:00 # 0
Как-то так.
Lure Of Chaos 16.06.2011 17:54 # 0
Govnocoder#0xFF 16.06.2011 19:46 # 0
guest8 08.04.2019 20:50 # −999
guest8 08.04.2019 21:10 # −999
guest8 09.04.2019 10:49 # −999
guest8 09.04.2019 17:58 # −999
guest8 09.04.2019 17:59 # −999