protected override void updateImage() { if (isTypeRevealed) { if (explodeTimer.getfilledSegments() == 0 && base.getSprite() != explodeSprite) { base.setSprite(explodeSprite); base.setFrame(base.getSprite().getTotalFrames() - angryTimer); } else if (angry && base.getSprite() != angrySprite) { base.setSprite(angrySprite); base.setFrame(base.getSprite().getTotalFrames() - angryTimer); } else if (base.getSprite() != complacentSprite) { base.setSprite(complacentSprite); base.setFrame(base.getSprite().getTotalFrames() - angryTimer); } } else { base.updateImage(); } }
/** * Will Synk this objects representative with the state of this enemy * @param turnTime */ internal void updateRepresentative() { //Checking Representative if (representative != null) { //Repositioning if nessesary and able if (hostSet != null) { if (!hostSet.moveRepresentative(representative, currentRow, currentCollumn)) { removeThis(); } } } //Creating Representative and moving into position else if (hostSet != null) { representative = new InteractableObject(); if (!hostSet.moveRepresentative(representative, currentRow, currentCollumn)) { removeThis(); } } //Updating Representative Type reveal status etc.. ((Representative)representative).subject = this; ((Representative)representative).setRevealStatus(isTypeRevealed); ((Representative)representative).setPartialRevealStatus(isPartialRevealed); ((Representative)representative).type = type; ((Representative)representative).resetChanges(); ((Representative)representative).setScore(score); ((Representative)representative).setMaxHealth(health.getMaxSegments()); ((Representative)representative).setCurrentHealth(health.getfilledSegments()); ((Representative)representative).setVulnerability(invulnerable); ((Representative)representative).setInfectStatus(infectedTimer); ((Representative)representative).setHighlight(isEnemyCircled()); }