diff --git a/index.html b/index.html index 70845c1..44b5658 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ .rod { float: right; - width: 25px; + width: 50px; height: 300px; border: 1px solid black; background-color: lightblue; @@ -52,7 +52,9 @@ } .fish { - + width: 50px; + position: fixed; + z-index: 10; } @@ -60,14 +62,15 @@
-

+

+ fish.sprite
{{ force }} | {{ pull }} | {{ intervalID }}
PULL
- let there be fish + let there be fish
@@ -82,14 +85,18 @@ return { force: 0, pull: false, + pullRate: 1.5, + dropRate: 2.5, intervalID: null, + fishMovementIntervalID: null, fish: null, fishies: [ { name: 'Freddy the fishy', - strength: 1, - quirky: false, - points: 100 + strength: 3, + quirkyness: 100, + points: 100, + sprite: './assets/fishTile_074.png' } ] } @@ -102,13 +109,13 @@ if (vue.pull) { vue.intervalID = setInterval(function () { if (vue.force < 125) { - vue.force = Number(vue.force) + 1; + vue.force = Number(vue.force) + vue.pullRate; } }, 50); } else { vue.intervalID = setInterval(function () { if (vue.force >= 0.0) { - vue.force = Number(vue.force) - 2; + vue.force = Number(vue.force) - vue.dropRate; } if (vue.force < 0.7) { @@ -123,7 +130,16 @@ this.force = Number(this.force) + 0.5; }, deployFish() { - this.fish = this.fishies.random; + this.fish = this.fishies.random(); + this.startFishLifecycle(); + }, + startFishLifecycle() { + let vue = this; + this.fish.position = 0; + + this.fishMovementIntervalID = setInterval(() => { + + }, 50); } } };