Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- * My problem is not being able to identify 't' as a Troll()
- *
- */
- function Troll() {}
- Troll.prototype = new jaws.Sprite({})
- var t = new Troll()
- t.constructor.name // "Sprite" ... how to I identify t as a Troll?
- // Sure, I can do 'this.type = Troll' or simular inside Troll(), but a native way would be best.
Add Comment
Please, Sign In to add comment