Skip to content

Commit

Permalink
Merge pull request #2 from PizzaTowerFanGD/master
Browse files Browse the repository at this point in the history
Platformered Menu Game if it was good
  • Loading branch information
user95401 authored Jan 1, 2025
2 parents 1ff9810 + d7b7fce commit 60453c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
21 changes: 0 additions & 21 deletions LICENSE.txt

This file was deleted.

16 changes: 11 additions & 5 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"id": "user95401.platformered_menu_game",
"name": "Platformered Menu Game",
"version": "v1.2.2",
"version": "v1.2.4",
"developer": "user95401",
"description": "Player in main menu is in Platformer Mode now!",
"tags": [ "gameplay", "offline", "enhancement", "customization" ],
Expand All @@ -18,8 +18,8 @@
"source": "https://github.com/user95401/Platformered-Menu-Game"
},
"settings": {
"Freese Background": {
"name": "Freese Background",
"Freeze Background": {
"name": "Freeze Background",
"description": "",
"type": "bool",
"default": true
Expand All @@ -42,12 +42,18 @@
"type": "bool",
"default": true
},
"Runaway From Mouse": {
"name": "Runaway From Mouse",
"Run Away From Mouse": {
"name": "Run Away From Mouse",
"description": "",
"type": "bool",
"default": true
},
"Off-screen Protection": {
"name": "Off-screen Protection",
"description": "Moves icon right if too far left",
"type": "bool",
"default": true
},
"Mouse Zone": {
"name": "Mouse Zone",
"description": "mousezone mltpr",
Expand Down
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
$override bool init() {
auto init_result = MenuGameLayer::init();

if (SETTING(bool, "Runaway From Mouse")) {
if (SETTING(bool, "Run Away From Mouse")) {
this->schedule(schedule_selector(MenuGameLayerExt::runaway), 0.001);
};

Expand All @@ -30,7 +30,7 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
$override void update(float p0) {
MenuGameLayer::update(p0);

if (SETTING(bool, "Freese Background")) {
if (SETTING(bool, "Freeze Background")) {
m_backgroundSpeed = 0.1;
findFirstChildRecursive<CCNode>(m_groundLayer,
[](CCNode* node) {
Expand All @@ -56,7 +56,7 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {
else plr->m_holdingRight = rndb();
//dont go left a lot
plr->m_holdingLeft = plr->getPosition().x < 5 ? false : plr->m_holdingLeft;
plr->m_holdingRight = plr->getPosition().x < 5 ? true : plr->m_holdingRight;//go back to screen!
plr->m_holdingRight = (plr->getPosition().x < 5 and SETTING(bool, "Off-screen Protection")) ? true : plr->m_holdingRight;//go back to screen!

}
$override void resetPlayer() {
Expand All @@ -78,4 +78,4 @@ class $modify(MenuGameLayerExt, MenuGameLayer) {

}
}
};
};

0 comments on commit 60453c9

Please sign in to comment.