From 8781d49d8b1f0de88082137ba6832c5b5fdc9a2b Mon Sep 17 00:00:00 2001 From: Harley White Date: Fri, 14 May 2021 15:53:48 -0400 Subject: [PATCH] Improved particle mouse options --- changelog.md | 5 +++-- docs/particles.md | 3 +++ js/Demo/demoLayers.js | 7 +++++-- js/Demo/demoMod.js | 2 +- js/game.js | 2 +- js/technical/particleSystem.js | 3 ++- js/technical/systemComponents.js | 3 ++- 7 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 docs/particles.md diff --git a/changelog.md b/changelog.md index 1a064b3..82d964a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,9 @@ # The Modding Tree changelog: -- Particle +# v2.5.7 - +- Added a particle system! Not only can it be used for visual effects, but particles can interact with the mouse. They could be used to create golden cookies or collectables, for example. - Added marked feature to buyables, clickables, and challenges. By default, stars multi-completion challenges when maxed. -- Improved number formatting more. +- Improved number formatting slightly. # v2.5.6 - 5/14/21 - You can now use non-numeric ids for upgrades, buyables, etc. diff --git a/docs/particles.md b/docs/particles.md new file mode 100644 index 0000000..19ee30b --- /dev/null +++ b/docs/particles.md @@ -0,0 +1,3 @@ +Don't forget +- layer +- style \ No newline at end of file diff --git a/js/Demo/demoLayers.js b/js/Demo/demoLayers.js index 6093844..a56e550 100644 --- a/js/Demo/demoLayers.js +++ b/js/Demo/demoLayers.js @@ -573,8 +573,11 @@ const coolParticle = { onClick() { console.log("yay") }, - onHover() { - console.log("aaa") + onMouseOver() { + console.log("hi") + }, + onMouseLeave() { + console.log("bye") }, update() { //this.width += 1 diff --git a/js/Demo/demoMod.js b/js/Demo/demoMod.js index 539581a..42fdf37 100644 --- a/js/Demo/demoMod.js +++ b/js/Demo/demoMod.js @@ -11,7 +11,7 @@ let modInfo = { // Set your version in num and name let VERSION = { - num: "2.5.6", + num: "2.5.7", name: "Dreams Really Do Come True", } diff --git a/js/game.js b/js/game.js index 03eeb15..c70aee4 100644 --- a/js/game.js +++ b/js/game.js @@ -5,7 +5,7 @@ var scrolled = false; // Don't change this const TMT_VERSION = { - tmtNum: "2.5.6", + tmtNum: "2.5.7", tmtName: "Dreams Really Do Come True" } diff --git a/js/technical/particleSystem.js b/js/technical/particleSystem.js index e739535..ed368df 100644 --- a/js/technical/particleSystem.js +++ b/js/technical/particleSystem.js @@ -12,7 +12,8 @@ function makeParticles(data, amount=1) { switch(thing) { case 'onClick': // Functions that should be copied over - case 'onHover': + case 'onMouseEnter': + case 'onMouseLeave': case 'update': particle[thing] = data[thing] break; diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js index 0e792df..640c5db 100644 --- a/js/technical/systemComponents.js +++ b/js/technical/systemComponents.js @@ -191,7 +191,8 @@ var systemComponents = { 'particle': { props: ['data', 'index'], - template: ` + template: ` ` },