Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actuallride

Posted 05 November 2012 - 01:30 PM

<p>

<br />

<br />
The reason I decided to use singletons is that there&#39;s going to be only one instance of Fireball at all times and rather than calling new and delete, I thought it would be better to just make it singleton<br />
<br />
wait.. I just got an idea that forced me not to use singleton.<br />
thanks, anyways.<br />

<br />
When you come up with a solution to a problem you&#39;ve asked about, please post that solution.  Someone in the future may search for something related, find your post, and just see &quot;nevermind, I figured it out&quot;, which is frustrating.  You&#39;re not helping anyone by not posting it.  Posting your idea may also spur more discussion that leads to even better ideas.<br />

<br />
<br />
I could make fireball of different sizes, but to do that, I should construct multiple instances of fireball each containing different size info</p>
<pre>
[source lang=&quot;cpp&quot;]character.doSkill(new Fireball(3)) //3 is the size[/source]</pre>

#1lride

Posted 05 November 2012 - 01:14 PM


The reason I decided to use singletons is that there's going to be only one instance of Fireball at all times and rather than calling new and delete, I thought it would be better to just make it singleton

wait.. I just got an idea that forced me not to use singleton.
thanks, anyways.

When you come up with a solution to a problem you've asked about, please post that solution. Someone in the future may search for something related, find your post, and just see "nevermind, I figured it out", which is frustrating. You're not helping anyone by not posting it. Posting your idea may also spur more discussion that leads to even better ideas.


I could make fireball of different sizes, but to do that, I should construct multiple instances of fireball each containing different size info

PARTNERS