What is the difference in strings and string sprites?

From ggc

Jump to: navigation, search

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.





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter