<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Topic: CountUp Timer</title>
		<link>http://www.cocos2d-iphone.org/forum/topic/3763</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 01:54:58 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/topic/3763" rel="self" type="application/rss+xml" />

		<item>
			<title>onedayitwillmake on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22657</link>
			<pubDate>Fri, 08 Jan 2010 01:22:05 +0000</pubDate>
			<dc:creator>onedayitwillmake</dc:creator>
			<guid isPermaLink="false">22657@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Sorry but this topic reminds me a lot of, -this- topic <a href="http://www.cocos2d-iphone.org/forum/topic/3657#post-22149" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/3657#post-22149</a> with the same results.</p>
<p>did you set 'self-&#62;count = 0'; in the initializer?
</p></description>
		</item>
		<item>
			<title>jpv123 on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22647</link>
			<pubDate>Thu, 07 Jan 2010 22:52:45 +0000</pubDate>
			<dc:creator>jpv123</dc:creator>
			<guid isPermaLink="false">22647@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>it gives an error, because count is not declared.</p>
<p>count has to be declared like this</p>
<p><code>int count</code>
</p></description>
		</item>
		<item>
			<title>xStoryTeller on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22629</link>
			<pubDate>Thu, 07 Jan 2010 18:54:28 +0000</pubDate>
			<dc:creator>xStoryTeller</dc:creator>
			<guid isPermaLink="false">22629@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, I'm not on my mac so I'm not 100% sure this is correct code but it would be better to do this </p>
<pre><code>...
[self schedule:@selector(countUp:) interval:1];
...

-(void)countUp:(ccTime)dt {
count+=dt;
}</code></pre>
<p>This will make the counting up accurate, the value dt you get is the time between the actual intervals. Even though you put interval:1 there its not actually 1 second between each interval, its more like 0.99123, although this seems insignificant it does add up, slightly I admit but it still does. So why not do it like this, its not like its any harder ^.^ .
</p></description>
		</item>
		<item>
			<title>Tim on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22621</link>
			<pubDate>Thu, 07 Jan 2010 17:08:29 +0000</pubDate>
			<dc:creator>Tim</dc:creator>
			<guid isPermaLink="false">22621@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>And then in your countUp method add the following:</p>
<pre><code>[countLabel setString:[NSString stringWithFormat:@&#34;%i&#34;, count]];</code></pre>
<p>This assumes you've declared countLabel and set it's parameters, location, etc.
</p></description>
		</item>
		<item>
			<title>pabloruiz55 on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22604</link>
			<pubDate>Thu, 07 Jan 2010 12:07:55 +0000</pubDate>
			<dc:creator>pabloruiz55</dc:creator>
			<guid isPermaLink="false">22604@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi, you can do the following:</p>
<p>In your layer i suppose,</p>
<p>[self schedule:@selector(countUp) interval:1];</p>
<p>and then:</p>
<p>-(void)countUp<br />
{<br />
   count++;<br />
}
</p></description>
		</item>
		<item>
			<title>Bongeh on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22600</link>
			<pubDate>Thu, 07 Jan 2010 11:18:41 +0000</pubDate>
			<dc:creator>Bongeh</dc:creator>
			<guid isPermaLink="false">22600@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>can you not just make a cocos schduler that adds 1 to an int every second, then display the int in the label?
</p></description>
		</item>
		<item>
			<title>jpv123 on "CountUp Timer"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/3763#post-22543</link>
			<pubDate>Wed, 06 Jan 2010 19:22:36 +0000</pubDate>
			<dc:creator>jpv123</dc:creator>
			<guid isPermaLink="false">22543@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello. I asked this like a week ago, but there was no concrete answer</p>
<p>i just want a countUp timer that is displayed in a label</p>
<p>I know hot to make it with normal timers, but i read in the wiki that is not recommended to use this tipe of timers</p>
<p>Thanks in advance
</p></description>
		</item>

	</channel>
</rss>

