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:
 Disposable,KryoSerializable
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class - 
Field Summary
FieldsModifier and TypeFieldDescriptionfloat[][]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[][]boolean[][]boolean[]static final intstatic final intFields inherited from class com.prineside.tdi2.Registrable
S - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddEnemyWithFirstSpawn(Enemy enemy, Tile tile, int sideShift) Добавить врага в текущую волну У врага будет рандомно установлен спавнvoidaddEnemyWithPath(Enemy enemy, SpawnTile spawnTile, Path path, int sideShift, Wave wave, float passedTiles) voidaddStaticEnemy(Enemy enemy, float x, float y) booleanvoiddispose()Releases all resources of this object.voidvoiddrawEnemyHealth(Batch batch) Per-session value of Enemy.Factory#get...()getEmojiTexture(EnemyType enemyType) Per-session value of Enemy.Factory#get...()getHighlightTexture(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.getTexture(EnemyType enemyType) Per-session value of Enemy.Factory#get...()booleanvoidPerforms the final configuration of the system.voidvoidОбновить пути всех врагов.voidvoidregisterWithPath(Enemy enemy, Path path, int sideShiftIndex, float passedTiles) voidregisterWithRandomSideShift(Enemy enemy) voidregisterWithSideShift(Enemy enemy, int sideShiftIndex) voidsetup()Performs the initial configuration of the system.voidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, profileUpdateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered 
- 
Field Details
- 
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
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 replay - 
enemyTexture
 - 
enemyHighlightTexture
 - 
enemyEmojiTexture
 - 
enemyDamageVulnerability
public boolean[][] enemyDamageVulnerability - 
enemySpecialDamageVulnerability
public boolean[][] enemySpecialDamageVulnerability - 
enemyBuffVulnerability
public float[][] enemyBuffVulnerability 
 - 
 - 
Constructor Details
- 
EnemySystem
public EnemySystem() 
 - 
 - 
Method Details
- 
write
- Specified by:
 writein interfaceKryoSerializable- Overrides:
 writein classRegistrable
 - 
read
- Specified by:
 readin interfaceKryoSerializable- Overrides:
 readin classRegistrable
 - 
affectsGameState
public boolean affectsGameState()- Specified by:
 affectsGameStatein classGameSystem
 - 
setup
public void setup()Description copied from class:GameSystemPerforms the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.- Overrides:
 setupin classGameSystem
 - 
postSetup
public void postSetup()Description copied from class:GameSystemPerforms the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.- Overrides:
 postSetupin classGameSystem
 - 
postStateRestore
public void postStateRestore()- Overrides:
 postStateRestorein classGameSystem
 - 
registerWithRandomSideShift
 - 
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
 
 - 
registerWithSideShift
 - 
registerWithPath
 - 
queueAllEnemiesPathfinding
public void queueAllEnemiesPathfinding()Обновить пути всех врагов. Полезно в случае, если сменилась конфигурация карты. - 
addEnemyWithFirstSpawn
Добавить врага в текущую волну У врага будет рандомно установлен спавн- Parameters:
 sideShift- -1 - рандомно, Path.MIDDLE_SIDE_SHIFT - посредине и тд
 - 
addStaticEnemy
 - 
addEnemy
 - 
addEnemyWithPath
 - 
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
 - 
drawEnemyHealth
 - 
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
 disposein interfaceDisposable- Overrides:
 disposein classGameSystem
 
 -