Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* check if weak points are killed -- if so, take DMG */
- checkCanTakeDmg: function () {
- // Grab all of the weak points on screen (starts with 2)
- var length = ig.game.getEntitiesByType(EntityWeakPoint).length;
- for (var i = 0; i < length; i++) {
- if (length === 0) {
- this.canTakeDmg = true; // Never called
- this.type = ig.Entity.TYPE.B; // Never called
- }
- }
- console.log('total enemies:' + length); // Starts at 2, then I kill 2, returns 0
- console.log('can boss take dmg?:' + this.canTakeDmg); // Always returns false
- },
RAW Paste Data