Package com.prineside.tdi2.systems
Class RandomEncounterSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.RandomEncounterSystem
- All Implemented Interfaces:
Disposable,KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassstatic interfacestatic interface -
Field Summary
Fields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBird(EncounterBird bird) booleanvoidbirdAcceptAction(int birdIdx) voidbirdDeclineAction(int birdIdx) booleanCan be modified in place but only after PostSetup of this systemCan be modified in place but only after PostSetup of this systembooleanvoidPerforms the final configuration of the system.voidvoidvoidsetReceivedBonusLevelPass(boolean receivedBonusLevelPass) voidsetup()Performs the initial configuration of the system.voidstartFireworks(float mapX, float mapY) voidvoidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.GameSystem
dispose, getFastStateHash, profileUpdateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Constructor Details
-
RandomEncounterSystem
public RandomEncounterSystem()
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classRegistrable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classRegistrable
-
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
-
canGiveStateAffectingRewards
public boolean canGiveStateAffectingRewards() -
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
-
isReceivedBonusLevelPass
public boolean isReceivedBonusLevelPass() -
startFireworks
public void startFireworks(float mapX, float mapY) -
setReceivedBonusLevelPass
public void setReceivedBonusLevelPass(boolean receivedBonusLevelPass) -
getEncounterTypes
Can be modified in place but only after PostSetup of this system -
getRewardTypes
Can be modified in place but only after PostSetup of this system -
getRandom
-
selectRandomReward
-
update
public void update(float deltaTime) - Overrides:
updatein classGameSystem
-
addBird
-
getActiveBirds
-
startNewEncounter
public void startNewEncounter() -
birdAcceptAction
public void birdAcceptAction(int birdIdx) -
birdDeclineAction
public void birdDeclineAction(int birdIdx) -
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameStatein classGameSystem
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
prepareDefaultBird
-