Package com.prineside.tdi2.systems
Class EnemySystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.EnemySystem
- All Implemented Interfaces:
 com.badlogic.gdx.utils.Disposable,com.esotericsoftware.kryo.KryoSerializable
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intfloat[][]com.badlogic.gdx.graphics.Color[]Can be changed in runtime, per-session copy of values taken from Enemy.Factory Must be updated on state restore as assets are not stored in replayboolean[][]com.badlogic.gdx.graphics.g2d.TextureRegion[]com.badlogic.gdx.graphics.g2d.TextureRegion[]boolean[][]com.badlogic.gdx.graphics.g2d.TextureRegion[]boolean[]static final intstatic final intFields inherited from class com.prineside.tdi2.Registrable
S - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidДобавить врага в текущую волну У врага будет рандомно установлен спавнvoidvoidvoidaddStaticEnemy(Enemy enemy, float x, float y) booleanvoiddespawnEnemy(Enemy enemy) voiddispose()Releases all resources of this object.voidActually applies the damage given to the enemiesvoidvoiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float interpolatedTime) voiddrawEnemyHealth(com.badlogic.gdx.graphics.g2d.Batch batch) com.badlogic.gdx.graphics.ColorPer-session value of Enemy.Factory#get...()com.badlogic.gdx.graphics.g2d.TextureRegiongetEmojiTexture(EnemyType enemyType) Per-session value of Enemy.Factory#get...()com.badlogic.gdx.graphics.g2d.TextureRegiongetHighlightTexture(EnemyType enemyType) Per-session value of Enemy.Factory#get...()getReference(Enemy enemy) Use this method if you need to store a reference to Enemy anywhere.com.badlogic.gdx.graphics.g2d.TextureRegiongetTexture(EnemyType enemyType) Per-session value of Enemy.Factory#get...()doublebooleanvoidПроизвести окончательную настройку системы.voidvoidОбновить пути всех врагов.voidqueueDamage(DamageRecord record) voidqueueEnemyKill(DamageRecord lastDamage) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidvoidvoidvoidsetTowersMaxDps(double mdps) voidsetup()Произвести начальную настройку системы.voidupdate(float deltaTime) voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, profileUpdateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered 
- 
Field Details
- 
DAMAGE_DRAIN_MAX_ITERATIONS
public static final int DAMAGE_DRAIN_MAX_ITERATIONS- See Also:
 
 - 
RANDOM_SIDE_SHIFT
public static final int RANDOM_SIDE_SHIFT- See Also:
 
 - 
MIDDLE_SIDE_SHIFT
public static final int MIDDLE_SIDE_SHIFT- See Also:
 
 - 
flyingEnemy
public boolean[] flyingEnemy - 
enemyColor
public com.badlogic.gdx.graphics.Color[] enemyColorCan be changed in runtime, per-session copy of values taken from Enemy.Factory Must be updated on state restore as assets are not stored in replay - 
enemyTexture
public com.badlogic.gdx.graphics.g2d.TextureRegion[] enemyTexture - 
enemyHighlightTexture
public com.badlogic.gdx.graphics.g2d.TextureRegion[] enemyHighlightTexture - 
enemyEmojiTexture
public com.badlogic.gdx.graphics.g2d.TextureRegion[] enemyEmojiTexture - 
enemyDamageVulnerability
public boolean[][] enemyDamageVulnerability - 
enemySpecialDamageVulnerability
public boolean[][] enemySpecialDamageVulnerability - 
enemyBuffVulnerability
public float[][] enemyBuffVulnerability 
 - 
 - 
Constructor Details
- 
EnemySystem
public EnemySystem() 
 - 
 - 
Method Details
- 
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
 writein interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
 writein classRegistrable
 - 
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
 readin interfacecom.esotericsoftware.kryo.KryoSerializable- Overrides:
 readin classRegistrable
 - 
affectsGameState
public boolean affectsGameState()- Specified by:
 affectsGameStatein classGameSystem
 - 
setup
public void setup()Description copied from class:GameSystemПроизвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.- Overrides:
 setupin classGameSystem
 - 
postSetup
public void postSetup()Description copied from class:GameSystemПроизвести окончательную настройку системы. Во время вызова, все системы загружены и установлены (setup()), все слушатели добавлены- Overrides:
 postSetupin classGameSystem
 - 
postStateRestore
public void postStateRestore()- Overrides:
 postStateRestorein classGameSystem
 - 
register
 - 
getReference
Use this method if you need to store a reference to Enemy anywhere.- Returns:
 - managed wrap for Enemy which will become empty as soon as Enemy becomes unregistered
 
 - 
register
 - 
register
 - 
queueDamage
 - 
getTowersMaxDps
public double getTowersMaxDps()- Returns:
 - максимальный урон в секунду от всех башен
 
 - 
setTowersMaxDps
public void setTowersMaxDps(double mdps)  - 
despawnEnemy
 - 
queueEnemyKill
 - 
queueAllEnemiesPathfinding
public void queueAllEnemiesPathfinding()Обновить пути всех врагов. Полезно в случае, если сменилась конфигурация карты. - 
addEnemy
Добавить врага в текущую волну У врага будет рандомно установлен спавн- Parameters:
 sideShift- -1 - рандомно, Path.MIDDLE_SIDE_SHIFT - посредине и тд
 - 
addStaticEnemy
 - 
addEnemy
 - 
addEnemy
 - 
drainDamageAndKillQueue
public void drainDamageAndKillQueue()Actually applies the damage given to the enemies - 
drainDamageAndKillQueueTillEmpty
public void drainDamageAndKillQueueTillEmpty() - 
update
public void update(float deltaTime) - Overrides:
 updatein classGameSystem
 - 
getSystemName
- Specified by:
 getSystemNamein classGameSystem
 - 
isEmojiEnemies
public boolean isEmojiEnemies() - 
getColor
Per-session value of Enemy.Factory#get...() - 
getTexture
Per-session value of Enemy.Factory#get...() - 
getHighlightTexture
Per-session value of Enemy.Factory#get...() - 
getEmojiTexture
Per-session value of Enemy.Factory#get...() - 
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float interpolatedTime)  - 
drawEnemyHealth
public void drawEnemyHealth(com.badlogic.gdx.graphics.g2d.Batch batch)  - 
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
 disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
 disposein classGameSystem
 
 -