1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-22 00:21:32 +00:00

Improved particle mouse options

This commit is contained in:
Harley White 2021-05-14 15:53:48 -04:00
parent 96cecedec5
commit 8781d49d8b
7 changed files with 17 additions and 8 deletions

View file

@ -1,8 +1,9 @@
# The Modding Tree changelog: # 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. - 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 # v2.5.6 - 5/14/21
- You can now use non-numeric ids for upgrades, buyables, etc. - You can now use non-numeric ids for upgrades, buyables, etc.

3
docs/particles.md Normal file
View file

@ -0,0 +1,3 @@
Don't forget
- layer
- style

View file

@ -573,8 +573,11 @@ const coolParticle = {
onClick() { onClick() {
console.log("yay") console.log("yay")
}, },
onHover() { onMouseOver() {
console.log("aaa") console.log("hi")
},
onMouseLeave() {
console.log("bye")
}, },
update() { update() {
//this.width += 1 //this.width += 1

View file

@ -11,7 +11,7 @@ let modInfo = {
// Set your version in num and name // Set your version in num and name
let VERSION = { let VERSION = {
num: "2.5.6", num: "2.5.7",
name: "Dreams Really Do Come True", name: "Dreams Really Do Come True",
} }

View file

@ -5,7 +5,7 @@ var scrolled = false;
// Don't change this // Don't change this
const TMT_VERSION = { const TMT_VERSION = {
tmtNum: "2.5.6", tmtNum: "2.5.7",
tmtName: "Dreams Really Do Come True" tmtName: "Dreams Really Do Come True"
} }

View file

@ -12,7 +12,8 @@ function makeParticles(data, amount=1) {
switch(thing) { switch(thing) {
case 'onClick': // Functions that should be copied over case 'onClick': // Functions that should be copied over
case 'onHover': case 'onMouseEnter':
case 'onMouseLeave':
case 'update': case 'update':
particle[thing] = data[thing] particle[thing] = data[thing]
break; break;

View file

@ -191,7 +191,8 @@ var systemComponents = {
'particle': { 'particle': {
props: ['data', 'index'], props: ['data', 'index'],
template: `<img class='particle instant' v-bind:style="constructParticleStyle(data)" v-bind:src="data.image" v-on:click="run(data.onClick, data)" v-on:mouseenter="run(data.onHover, data)"> template: `<img class='particle instant' v-bind:style="[constructParticleStyle(data), data.style]" v-bind:src="data.image"
v-on:click="run(data.onClick, data)" v-on:mouseenter="run(data.onMouseOver, data)" v-on:mouseleave="run(data.onMouseLeave, data)">
</img> </img>
` `
}, },