| Summary: | Restarting the game to start scene will not reset the previously clicked button | ||
|---|---|---|---|
| Product: | CS3343_Kunkun_Loves_English | Reporter: | xuezhwang2-c |
| Component: | Scene | Assignee: | shangpguo2 |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | shangpguo2, xuezhwang2-c |
| Priority: | High | ||
| Version: | 1.0 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS | ||
| Attachments: | Result | ||
|
Description
xuezhwang2-c
2021-11-13 15:50:49 HKT
Created attachment 75 [details]
Result
Hi, Xuezhen! Thanks for reporting this bug. After checking, I think the issue is not caused by what you proposed. It is because "private static Button startButtons[] = new Button[GlobalConstants.NUM_GAME_MODE];" in the LoginScene.java. Since it is static, even it can reduce some time to load the picture. (we don't need to load pictures from file system every time we go back to login scene.) Nevertheless, the state that we store in the button will not change. After changing the code to "private Button startButtons[] = new Button[GlobalConstants.NUM_GAME_MODE];", the problem is fixed. |