Skip to content

Commit 349cffc

Browse files
committed
Code refactor.
1 parent 175ad14 commit 349cffc

File tree

1 file changed

+0
-115
lines changed

1 file changed

+0
-115
lines changed

src/main/java/com/khomsi/game/main/logic/CutSceneManager.java

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -29,122 +29,7 @@ public void draw(Graphics2D g2d) {
2929
}
3030
}
3131

32-
/* public void scene_opening() {
33-
int pressEnterY = 520;
34-
String text;
35-
if (this.scenePhase == 0) {
36-
this.drawBlackBackground(1.0F);
37-
this.alpha += 0.005F;
38-
if (this.alpha > 1.0F) {
39-
this.alpha = 1.0F;
40-
}
41-
42-
text = "This is an island somewhere far away.\n\nBlue Boy, an aspiring adventurer, \ncomes to this island because he hears \nthat it holds a legendary treasure.\n\n\n\n\n";
43-
this.drawString(this.alpha, 35.0F, 170, text, 40);
44-
this.drawString(this.alpha, 35.0F, pressEnterY, "(Press Enter to continue)", 40);
45-
if (this.gameManager.keyHandler.isEnterPressed) {
46-
this.gameManager.keyHandler.isEnterPressed = false;
47-
++this.scenePhase;
48-
}
49-
}
50-
51-
if (this.scenePhase == 1) {
52-
this.drawBlackBackground(1.0F);
53-
this.alpha -= 0.02F;
54-
if (this.alpha < 0.0F) {
55-
this.alpha = 0.0F;
56-
++this.scenePhase;
57-
}
58-
59-
text = "This is an island somewhere far away.\n\nBlue Boy, an aspiring adventurer, \ncomes to this island because he hears \nthat it holds a legendary treasure.\n\n\n\n\n";
60-
this.drawString(this.alpha, 35.0F, 170, text, 40);
61-
this.drawString(this.alpha, 35.0F, pressEnterY, "(Press Enter to continue)", 40);
62-
}
63-
64-
if (this.scenePhase == 2) {
65-
this.drawBlackBackground(1.0F);
66-
this.alpha += 0.01F;
67-
if (this.alpha > 1.0F) {
68-
this.alpha = 1.0F;
69-
}
70-
71-
text = "Can he safely find the treasure on this island,\nwhere dangerous monsters roam?\n\nIt all depends on you.\n\n\n\n\n\n";
72-
this.drawString(this.alpha, 35.0F, 200, text, 40);
73-
this.drawString(this.alpha, 35.0F, pressEnterY, "(Press Enter to continue)", 40);
74-
if (this.gameManager.keyHandler.isEnterPressed) {
75-
this.gameManager.keyHandler.isEnterPressed = false;
76-
++this.scenePhase;
77-
}
78-
}
79-
80-
if (this.scenePhase == 3) {
81-
this.drawBlackBackground(1.0F);
82-
this.alpha -= 0.02F;
83-
if (this.alpha < 0.0F) {
84-
this.alpha = 0.0F;
85-
++this.scenePhase;
86-
}
87-
88-
text = "Can he safely find the treasure on this island,\nwhere dangerous monsters roam?\n\nIt all depends on you.\n\n\n\n\n";
89-
this.drawString(this.alpha, 35.0F, 200, text, 40);
90-
this.drawString(this.alpha, 35.0F, pressEnterY, "(Press Enter to continue)", 40);
91-
}
92-
93-
if (this.scenePhase == 4) {
94-
this.drawBlackBackground(1.0F);
95-
this.alpha += 0.005F;
96-
if (this.alpha > 1.0F) {
97-
this.alpha = 1.0F;
98-
}
99-
100-
this.drawString(this.alpha, 35.0F, 50, "<How to Play>", 40);
101-
text = "Move: [W/A/S/D]\nAttack/Interact/Confirm: [ENTER]\nMagic: [F]\nGuard/Parry: [SPACE]\nInventory/Status: [C]\nMap: [M] Mini Map: [X]\nPause: [P]\nOptions: [ESC]\n\n";
102-
this.drawString(this.alpha, 35.0F, 120, text, 45);
103-
this.drawString(this.alpha, 35.0F, pressEnterY, "(Press Enter to start the adventure)", 40);
104-
if (this.gameManager.keyHandler.isEnterPressed) {
105-
this.gameManager.keyHandler.isEnterPressed = false;
106-
++this.scenePhase;
107-
}
108-
}
109-
110-
if (this.scenePhase == 5) {
111-
this.gameManager.keyHandler.isEnterPressed = false;
112-
this.sceneNumber = 0;
113-
this.scenePhase = 0;
114-
GameManager var10000 = this.gameManager;
115-
this.gameManager.getClass();
116-
var10000.gameState = 1;
117-
this.gameManager.playMusic(0);
118-
}
119-
120-
}
121-
122-
public void drawBlackBackground(float alpha) {
123-
this.g2d.setComposite(AlphaComposite.getInstance(3, alpha));
124-
this.g2d.setColor(Color.black);
125-
Graphics2D var10000 = this.g2d;
126-
this.gameManager.getClass();
127-
this.gameManager.getClass();
128-
var10000.fillRect(0, 0, 960, 576);
129-
this.g2d.setComposite(AlphaComposite.getInstance(3, 1.0F));
130-
}
131-
132-
public void drawString(float alpha, float fontSize, int y, String text, int lineHeight) {
133-
this.g2d.setComposite(AlphaComposite.getInstance(3, alpha));
134-
this.g2d.setColor(Color.white);
135-
this.g2d.setFont(this.g2d.getFont().deriveFont(fontSize));
136-
String[] var9;
137-
int var8 = (var9 = text.split("\n")).length;
138-
139-
for (int var7 = 0; var7 < var8; ++var7) {
140-
String line = var9[var7];
141-
int x = this.gameManager.ui.getXCenterText(line);
142-
this.g2d.drawString(line, x, y);
143-
y += lineHeight;
144-
}
14532

146-
this.g2d.setComposite(AlphaComposite.getInstance(3, 1.0F));
147-
}*/
14833

14934
public void sceneDungeonBoss() {
15035
switch (scenePhase) {

0 commit comments

Comments
 (0)