This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
225 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.wearedevs.someclicker.cases; | ||
|
||
import java.awt.TrayIcon.MessageType; | ||
|
||
import com.wearedevs.someclicker.Main; | ||
import com.wearedevs.someclicker.cases.cases.ClickCase; | ||
import com.wearedevs.someclicker.cases.cases.ClickMultiplierCase; | ||
import com.wearedevs.someclicker.cases.cases.MEMESoundCase; | ||
import com.wearedevs.someclicker.cases.cases.MLGSoundCase; | ||
import com.wearedevs.someclicker.cases.cases.SoundCase; | ||
import com.wearedevs.someclicker.handlers.CaseHandler; | ||
import com.wearedevs.someclicker.util.NotificationUtil; | ||
import com.wearedevs.someclicker.util.PlaySound; | ||
import com.wearedevs.someclicker.util.WeightedCollection; | ||
|
||
/** | ||
* Handles When and What Case a User Should Get. | ||
*/ | ||
public class GetCase { | ||
public static double caseGoal = 100; | ||
|
||
public static void checkCases() { | ||
if(Main.clicks >= caseGoal) { | ||
caseGoal *= 2; | ||
WeightedCollection<Case> w = new WeightedCollection<Case>(); | ||
|
||
w.add(100, new ClickCase()); | ||
w.add(10, new ClickMultiplierCase()); | ||
w.add(30, new SoundCase()); | ||
w.add(20, new MLGSoundCase()); | ||
w.add(20, new MEMESoundCase()); | ||
|
||
CaseHandler.unlock(w.next()); | ||
|
||
PlaySound.playSound("/sound/cases/get.wav"); | ||
|
||
//TODO: Fix | ||
NotificationUtil.displayCaseNotif("New Case!", "You Have a New Case! Click Cases to Open It!", MessageType.INFO); | ||
} | ||
} | ||
} | ||
|
32 changes: 32 additions & 0 deletions
32
src/com/wearedevs/someclicker/cases/cases/MEMESoundCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.wearedevs.someclicker.cases.cases; | ||
|
||
import com.wearedevs.someclicker.cases.Case; | ||
import com.wearedevs.someclicker.cases.CaseOutcome; | ||
import com.wearedevs.someclicker.handlers.SoundUnlocker; | ||
import com.wearedevs.someclicker.sound.sounds.MEME_YouNeedAWebsiteSound; | ||
import com.wearedevs.someclicker.util.WeightedCollection; | ||
|
||
public class MEMESoundCase extends Case { | ||
|
||
public WeightedCollection<CaseOutcome> getAllOutcomes() { | ||
WeightedCollection<CaseOutcome> out = new WeightedCollection<CaseOutcome>(); | ||
|
||
//Bass | ||
out.add(50, new CaseOutcome() { | ||
public void onOutcome() { | ||
SoundUnlocker.unlock(new MEME_YouNeedAWebsiteSound()); | ||
} | ||
|
||
public String getName() { | ||
return "You Need a Website Sound"; | ||
} | ||
}); | ||
|
||
return out; | ||
} | ||
|
||
public String getName() { | ||
return "Meme Sound Case"; | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.wearedevs.someclicker.cases.cases; | ||
|
||
import com.wearedevs.someclicker.cases.Case; | ||
import com.wearedevs.someclicker.cases.CaseOutcome; | ||
import com.wearedevs.someclicker.handlers.SoundUnlocker; | ||
import com.wearedevs.someclicker.sound.sounds.MLG_BassSound; | ||
import com.wearedevs.someclicker.sound.sounds.MLG_HitmarkerSound; | ||
import com.wearedevs.someclicker.sound.sounds.MLG_WowSound; | ||
import com.wearedevs.someclicker.util.WeightedCollection; | ||
|
||
public class MLGSoundCase extends Case { | ||
|
||
public WeightedCollection<CaseOutcome> getAllOutcomes() { | ||
WeightedCollection<CaseOutcome> out = new WeightedCollection<CaseOutcome>(); | ||
|
||
//Bass | ||
out.add(20, new CaseOutcome() { | ||
public void onOutcome() { | ||
SoundUnlocker.unlock(new MLG_BassSound()); | ||
} | ||
|
||
public String getName() { | ||
return "MLG Bass Sound"; | ||
} | ||
}); | ||
|
||
//Wow | ||
out.add(60, new CaseOutcome() { | ||
public void onOutcome() { | ||
SoundUnlocker.unlock(new MLG_WowSound()); | ||
} | ||
|
||
public String getName() { | ||
return "MLG Wow Sound"; | ||
} | ||
}); | ||
|
||
//Hitmarker | ||
out.add(30, new CaseOutcome() { | ||
public void onOutcome() { | ||
SoundUnlocker.unlock(new MLG_HitmarkerSound()); | ||
} | ||
|
||
public String getName() { | ||
return "MLG Hitmarker Sound"; | ||
} | ||
}); | ||
|
||
return out; | ||
} | ||
|
||
public String getName() { | ||
return "MLG Sound Case"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/com/wearedevs/someclicker/sound/sounds/DiscordMessageSound.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wearedevs.someclicker.sound.sounds; | ||
|
||
import com.wearedevs.someclicker.sound.Sound; | ||
|
||
public class DiscordMessageSound extends Sound { | ||
|
||
public String getName() { | ||
return "Discord Message"; | ||
} | ||
|
||
public String getFileName() { | ||
return "discordmessage.wav"; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/com/wearedevs/someclicker/sound/sounds/MEME_YouNeedAWebsiteSound.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wearedevs.someclicker.sound.sounds; | ||
|
||
import com.wearedevs.someclicker.sound.Sound; | ||
|
||
public class MEME_YouNeedAWebsiteSound extends Sound { | ||
|
||
public String getName() { | ||
return "You Need a Website"; | ||
} | ||
|
||
public String getFileName() { | ||
return "MEME_youneedawebsite.wav"; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/com/wearedevs/someclicker/sound/sounds/MLG_BassSound.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wearedevs.someclicker.sound.sounds; | ||
|
||
import com.wearedevs.someclicker.sound.Sound; | ||
|
||
public class MLG_BassSound extends Sound { | ||
|
||
public String getName() { | ||
return "MLG Bass"; | ||
} | ||
|
||
public String getFileName() { | ||
return "MLG_bass.wav"; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/com/wearedevs/someclicker/sound/sounds/MLG_HitmarkerSound.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wearedevs.someclicker.sound.sounds; | ||
|
||
import com.wearedevs.someclicker.sound.Sound; | ||
|
||
public class MLG_HitmarkerSound extends Sound { | ||
|
||
public String getName() { | ||
return "MLG Hitmarker"; | ||
} | ||
|
||
public String getFileName() { | ||
return "MLG_hitmarker.wav"; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/com/wearedevs/someclicker/sound/sounds/MLG_WowSound.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.wearedevs.someclicker.sound.sounds; | ||
|
||
import com.wearedevs.someclicker.sound.Sound; | ||
|
||
public class MLG_WowSound extends Sound { | ||
|
||
public String getName() { | ||
return "MLG Wow"; | ||
} | ||
|
||
public String getFileName() { | ||
return "MLG_wow.wav"; | ||
} | ||
|
||
} |