What is the difference in strings and string sprites?
From ggc
Strings are part of the Java built-in libraries and StringSprites are part of the FANG Engine. Essentially, a StringSprite is the way to display a String on the FANG Engine canvas. In the basic Java, to display a string to the console you would do something like:
String x; x="Howdy!"; System.out.println(x);
In the FANG Engine, you would do something like
StringSprite x;
x=new StringSprite("Howdy!");
x.setScale(0.75);
x.setLocation(0.5, 0.5);
canvas.addSprite(x);
and it would show the word Howdy! in the middle of the screen taking up 75% of the width of the canvas.
- This page was last modified on 31 January 2008, at 15:04.
- This page has been accessed 196 times.
- Privacy policy
- About ggc
- Disclaimers
- Powered by MediaWiki!









