I feel regret about it because I am supposed to work hard on my game, so what should I do next, well, let me play my own games and think about it
Ok, so I tested my games, the 5 ppl walking around and when I start to sing, they will float over and stop there, I want to make them move normally
Ok, so today goal is to try make those 5 people run to the main player and give money when the main character sing, and when non sing, they will go back to their original path
After 1 hour and 30 minutes, I done it
-(void)playerdonate:(int) x: (int) y
{
[self stopAllActions ];
[self walk2picFunction];
id action1 = [CCMoveTo actionWithDuration: 2 position:ccp(x-80, y)];
id action2=[CCCallFuncN actionWithTarget:self
selector:@selector(stopAllActions)];
id action3=[CCCallFuncN actionWithTarget:self
selector:@selector(throw2picFunction)];
[self runAction: [CCSequence actions:action1,action2,action3,nil]];
}
here is how it work
the moment my main character sing, i will stop all action, then the 5 player will start to walk to my main character, so i use a CCSequence to chain the 3 type of action
stop all action
walk 2 pic action
action1, move to my main character
action2, stop all action
action3, throw money action
Once release, then they should go back to their original routine
- (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {
[myplayer[0] playergo:5 :200];
[myplayer[1] playergo:7 :220];
[myplayer[2] playergo:9 :240];
[myplayer[3] playergo:11 :260];
[myplayer[4] playergo:13 :280];
}
hey, just came across your blog. u've got some guts to quit! :)
ReplyDeleteall the best from myside
- iOS developer from 2 years.
thanks dude, you are my first visitor and I am glad you came to read my blog
ReplyDeleteI can't get my lazy ass to do anything, How is your game doing?