CCLabelTTF print two time

Forums Programming cocos2d support (graphics engine) CCLabelTTF print two time

This topic contains 3 replies, has 2 voices, and was last updated by  Allen Walker 2 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
February 3, 2012 at 11:07 pm #238947

Allen Walker
Participant
@allen-walker

Hi all! i’m new in the forum :)

I’m programming a Visual Novel engine in obj-c with cocos2d. Now, i’m writing the class for drawing text messages, but i’m a problem with one method…

When I init this class with string message, I split the message in a NSMutableArray witch contain one single words in each element of the array.

At beginning my class scheduled a selector each 0.02 sec and print a single letter of the word in the position 0 in the NSMutableArray.

When i get the touch input and the message is not finished, I unscheduled the last method and call a new method that write all message in one time.

But, this method print two times the same word and i don’t understand why…

I post the two methods..

http://pastebin.com/xaZSjvn1

February 4, 2012 at 8:17 am #364458

Allen Walker
Participant
@allen-walker

anyone??

February 4, 2012 at 2:43 pm #364459

capezzbr
Participant
@capezzbr

Try to place a breakpoint and debug with Xcode for finding the issue.

February 4, 2012 at 3:28 pm #364460

Allen Walker
Participant
@allen-walker

already done … but I can’t fix it.. in NSLog it’s all okay .. meanwhile in the video there are two print of the first word without the first letter…

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.