mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Implement login reward activity
This commit is contained in:
@@ -111,6 +111,7 @@ public class ActivityManager extends PlayerManager implements GameDatabaseObject
|
||||
|
||||
// TODO improve activity creation
|
||||
GameActivity activity = switch (data.getType()) {
|
||||
case LoginReward -> new LoginRewardActivity(this, data);
|
||||
case TowerDefense -> new TowerDefenseActivity(this, data);
|
||||
case Trial -> new TrialActivity(this, data);
|
||||
case Levels -> new LevelsActivity(this, data);
|
||||
@@ -122,6 +123,14 @@ public class ActivityManager extends PlayerManager implements GameDatabaseObject
|
||||
|
||||
return activity;
|
||||
}
|
||||
|
||||
// Events
|
||||
|
||||
public synchronized void onLogin() {
|
||||
for (var activity : this.getActivities().values()) {
|
||||
activity.onLogin();
|
||||
}
|
||||
}
|
||||
|
||||
// Database
|
||||
|
||||
|
||||
Reference in New Issue
Block a user