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:
parent
96cecedec5
commit
8781d49d8b
7 changed files with 17 additions and 8 deletions
|
@ -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.
|
||||
|
|
3
docs/particles.md
Normal file
3
docs/particles.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Don't forget
|
||||
- layer
|
||||
- style
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -191,7 +191,8 @@ var systemComponents = {
|
|||
|
||||
'particle': {
|
||||
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>
|
||||
`
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue