Package com.prineside.tdi2
Class Enemy
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.Enemy
- All Implemented Interfaces:
 KryoSerializable,ScheduledUpdater.Updatable
- Direct Known Subclasses:
 ArmoredEnemy,BossEnemy,BrootEnemy,ConstructorBossEnemy,FastEnemy,FighterEnemy,GenericEnemy,HealerEnemy,HeliEnemy,IcyEnemy,JetEnemy,LightEnemy,MetaphorBossCreepEnemy,MetaphorBossEnemy,MobchainBossBodyEnemy,MobchainBossCreepEnemy,MobchainBossHeadEnemy,RegularEnemy,SnakeBossBodyEnemy,SnakeBossHeadEnemy,SnakeBossTailEnemy,StrongEnemy,ToxicEnemy
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUse this wrapper to store a reference to an enemy (always if there's a chance the enemy will become unregistered between the moment it is stored & stored reference is used in the code) No need to use as method argument / as local variable (if there's no chance for the enemy to become unregistered while it is being used locally)static classEnemy.Factory<T extends Enemy> - 
Field Summary
FieldsModifier and TypeFieldDescriptionfloatstatic final Stringfloatfloatfloatfloatboolean[]intbooleanfloatfloatfloatbooleanstatic final Colorbooleanfloatintintfloatbooleanbooleanintfloatintfloatintintstatic final floatfloatintstatic final intbooleanbooleanFields inherited from class com.prineside.tdi2.Registrable
S - 
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDrawInterpolation(float interpolatedTime) booleancanBeAttackedBy(Tower tower) Дополнительная проверка, основная находится в tower.canAttackEnemyfinal booleancanBeBuffed(BuffType buff) booleanvoidvoiddrawBatchAdditive(Batch batch, float deltaTime) В основном подсветка удара врага и ауры Не вызывается, если партиклы отключеныvoiddrawHealth(Batch batch) booleanfloatgetAbilityVulnerability(AbilityType abilityType) floatfloatgetBuffedDamageMultiplier(TowerType towerType, DamageType damageType) floatgetBuffsByTypeOrNull(BuffType buffType) floatgetBuffVulnerability(BuffType buff) getColor()floatfloatintfloatgetPassedTilesDelta(float deltaTime) Сколько тайлов пройдет враг за это время, исходя из текущей позицииfloatgetSize()Радиус врага в пикселяхfloatgetSpeed()floatfloatgetTowerDamageMultiplier(TowerType towerType) getUserData(String key) floatgiveDamage(Tower tower, float damage, DamageType damageType) Вызывать только через enemySystembooleanhasBuffsByType(BuffType buffType) abstract booleanvoidbooleanisAir()booleanbooleanbooleanisVulnerableTo(DamageType damageType) booleanisVulnerableToSpecial(SpecialDamageType damageType) voidВызывается, когда position устанавливается системой в соответствии с path и passedTiles.voidonPreDie()voidvoidfinal intfinal voidscheduledUpdatableSetId(int id) voidscheduledUpdate(float deltaTime) voidsetHealth(float newHealth) voidsetKillExp(float exp) voidsetMaxHealth(float health) voidsetPosition(float x, float y) voidsetPosition(Vector2 position) voidvoidsetSpeed(float newSpeed) voidsetUserData(String idx, Object data) voidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered 
- 
Field Details
- 
ATTACHED_PARTICLE_REGENERATION_BUFF
- See Also:
 
 - 
UNREGISTERED_ID
public static final int UNREGISTERED_ID- See Also:
 
 - 
HEALTH_BAR_BACKGROUND_COLOR
 - 
SIZE
public static final float SIZE- See Also:
 
 - 
killScore
public int killScore - 
angle
public float angle - 
drawAngle
public float drawAngle - 
drawScale
public float drawScale - 
healthBarInvisible
public boolean healthBarInvisible - 
drawPosition
 - 
invisible
 - 
disabled
 - 
chasedByCrusher
public boolean chasedByCrusher - 
gaveMiningSpeedForGauss
public boolean gaveMiningSpeedForGauss - 
loot
 - 
thrownBackBy
 - 
ignitionProgress
public float ignitionProgress - 
ignitionIncreasedLastFrame
public int ignitionIncreasedLastFrame - 
notAffectsWaveKillCounter
 - 
lowAimPriority
 - 
caughtByCrushersSet
 - 
totalCatchesByCrushers
public int totalCatchesByCrushers - 
stunDebuffStats
 - 
attachedParticles
 - 
type
 - 
maxHealth
public float maxHealth - 
bounty
public float bounty - 
otherEnemiesNearby
public int otherEnemiesNearby - 
healthBarScale
public float healthBarScale - 
id
public int id - 
graphPath
 - 
pathSearches
public int pathSearches - 
ignorePathfinding
public boolean ignorePathfinding - 
sideShiftIndex
public int sideShiftIndex - 
passedTiles
public float passedTiles - 
sumPassedTiles
public float sumPassedTiles - 
existsTime
public float existsTime - 
buffsByType
 - 
buffsAppliedByType
public boolean[] buffsAppliedByType - 
spawnTile
 - 
wave
 - 
ignoredByAutoWaveCall
public boolean ignoredByAutoWaveCall - 
buffFreezingPercent
public float buffFreezingPercent - 
buffFreezingLightningLengthBonus
public float buffFreezingLightningLengthBonus - 
buffFreezingPoisonDurationBonus
public float buffFreezingPoisonDurationBonus - 
buffSnowballHits
public int buffSnowballHits - 
multishotTowerHits
 - 
wasAimedAtWithChainReactionBuff
public boolean wasAimedAtWithChainReactionBuff - 
wasStunnedByGauss
public boolean wasStunnedByGauss 
 - 
 - 
Method Details
- 
write
- Specified by:
 writein interfaceKryoSerializable- Overrides:
 writein classRegistrable
 - 
read
- Specified by:
 readin interfaceKryoSerializable- Overrides:
 readin classRegistrable
 - 
getUserData
 - 
setUserData
 - 
getCurrentTile
 - 
getColor
 - 
initBuffsByTypeArray
public void initBuffsByTypeArray() - 
hasBuffsByType
- Returns:
 - false if there are no buffs applied of the selected type. Buff arrays may not be allocated yet
 
 - 
getBuffsByTypeOrNull
 - 
update
public void update(float deltaTime)  - 
canHaveRandomSideShift
public boolean canHaveRandomSideShift() - 
giveDamage
Вызывать только через enemySystem - 
getSize
public float getSize()Радиус врага в пикселях - 
getSquaredSize
public float getSquaredSize() - 
scheduledUpdatableSetId
public final void scheduledUpdatableSetId(int id) - Specified by:
 scheduledUpdatableSetIdin interfaceScheduledUpdater.Updatable
 - 
scheduledUpdatableGetId
public final int scheduledUpdatableGetId()- Specified by:
 scheduledUpdatableGetIdin interfaceScheduledUpdater.Updatable
 - 
scheduledUpdate
public void scheduledUpdate(float deltaTime) - Specified by:
 scheduledUpdatein interfaceScheduledUpdater.Updatable
 - 
drawBatch
 - 
drawBatchAdditive
В основном подсветка удара врага и ауры Не вызывается, если партиклы отключены - 
setPositionToPath
public void setPositionToPath() - 
getPosition
 - 
setPosition
 - 
setPosition
public void setPosition(float x, float y)  - 
applyDrawInterpolation
public void applyDrawInterpolation(float interpolatedTime)  - 
addLoot
- Returns:
 - stack the item has been added into
 
 - 
getTexture
 - 
getHighlightTexture
 - 
getEmojiTexture
 - 
drawHealth
 - 
setHealth
public void setHealth(float newHealth)  - 
setKillExp
public void setKillExp(float exp)  - 
getKillExp
public float getKillExp() - 
getKillScore
public int getKillScore() - 
getHealth
public float getHealth() - 
setMaxHealth
public void setMaxHealth(float health)  - 
setSpeed
public void setSpeed(float newSpeed)  - 
getSpeed
public float getSpeed() - 
getPassedTilesDelta
public float getPassedTilesDelta(float deltaTime) Сколько тайлов пройдет враг за это время, исходя из текущей позиции - 
getBuffedSpeed
public float getBuffedSpeed() - 
getTowerDamageMultiplier
 - 
getBuffedDamageMultiplier
- Parameters:
 towerType- may be null
 - 
hasDrawPriority
public abstract boolean hasDrawPriority() - 
getBaseDamage
public float getBaseDamage() - 
onSpawned
public void onSpawned() - 
onPreDie
public void onPreDie() - 
onPositionSetToPath
public void onPositionSetToPath()Вызывается, когда position устанавливается системой в соответствии с path и passedTiles. Здесь можно откорректировать позицию. - 
canBeBuffed
 - 
getBuffVulnerability
 - 
isVulnerableTo
 - 
isBossRelated
public boolean isBossRelated() - 
isBossMainBodyPart
public boolean isBossMainBodyPart() - 
isVulnerableToSpecial
 - 
getAbilityVulnerability
 - 
canBeAttackedBy
Дополнительная проверка, основная находится в tower.canAttackEnemy - 
isAir
public boolean isAir() - 
dynamicPathfindingAllowed
public boolean dynamicPathfindingAllowed() - 
getBreakParticle
 - 
getHitParticle
 
 -