User:Soniccuz: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Soniccuz
imported>Soniccuz
Line 94: Line 94:
File:IGotAPetDragon.png
File:IGotAPetDragon.png
</gallery>
</gallery>

=What I've Learned in Code Diving Class Today Is=

'' protected boolean isOwnerCallingMe() {
if (owner != null) {
String text = owner.get("text");

if (text != null) {
text = text.trim().toLowerCase();

// react on calling the '''pet's name'''
final String '''title = getTitle();'''
if ((title != null) && text.startsWith(title.trim().toLowerCase())) {
return true;
}

// react on calling the '''pet type''' ("cat", "sheep", ...)
final String type = get("type");
......
return false;
}''

'''A pet's player given name is referenced as title, while the species variable is type. (but then "species" is actually a reserved word for telling sheep (just sheep mind you) from every other pet.'''


==Pet System Ideas==
==Pet System Ideas==