BlueGit

blue-star speeltuin

fw update

timfa wsadhelios · pushed by timfa

Authored 2022-10-17 · 4 years ago

Hash
d7d85d7422340c99691aba1264ec5f2823e240d4
Parent
7204503b
1 file changed +5 −6
build/framework.js +5 −6
@@ -377,7 +377,7 @@ class Renderer
377 377 {
378 378 if(this.cycle)
379 379 {
380 if(this.cycle.cycleSpeed && this.cycle.cycleSpeed == -1)
380 if(!this.cycle.cycleSpeed || this.cycle.cycleSpeed == -1)
381 381 {
382 382 this.subImage = this.cycle.default;
383 383 this.cycle.current = this.cycle.default;
@@ -451,7 +451,7 @@ class Renderer
451 451 );
452 452 }
453 453
454 setAnimation(label, defaultIndex, cycleSpeed)
454 setAnimation(label, defaultIndex, cycleSpeed = -1)
455 455 {
456 456 if(this.cycle)
457 457 {
@@ -459,10 +459,10 @@ class Renderer
459 459 {
460 460 this.cycle.defaultIndex = defaultIndex;
461 461 this.cycle.cycleSpeed = cycleSpeed;
462 return;
462 463 }
463 }
464 else
465 {
464 }
465
466 466 this.cycle = {
467 467 label: label,
468 468 cycleArray: this.sprite.animationCycles[label],
@@ -470,7 +470,6 @@ class Renderer
470 470 current: defaultIndex,
471 471 cycleSpeed: cycleSpeed,
472 472 timer: 0};
473 }
474 473 }
475 474
476 475 setAnimationCycleSpeed(cycleSpeed)
@@ -377,7 +377,7 @@ class Renderer
377 {
377 {
378 if(this.cycle)
378 if(this.cycle)
379 {
379 {
380 if(this.cycle.cycleSpeed && this.cycle.cycleSpeed == -1)
380 if(!this.cycle.cycleSpeed || this.cycle.cycleSpeed == -1)
381 {
381 {
382 this.subImage = this.cycle.default;
382 this.subImage = this.cycle.default;
383 this.cycle.current = this.cycle.default;
383 this.cycle.current = this.cycle.default;
@@ -451,7 +451,7 @@ class Renderer
451 );
451 );
452 }
452 }
453
453
454 setAnimation(label, defaultIndex, cycleSpeed)
454 setAnimation(label, defaultIndex, cycleSpeed = -1)
455 {
455 {
456 if(this.cycle)
456 if(this.cycle)
457 {
457 {
@@ -459,10 +459,10 @@ class Renderer
459 {
459 {
460 this.cycle.defaultIndex = defaultIndex;
460 this.cycle.defaultIndex = defaultIndex;
461 this.cycle.cycleSpeed = cycleSpeed;
461 this.cycle.cycleSpeed = cycleSpeed;
462 return;
462 }
463 }
463 }
464 }
464 else
465
465 {
466 this.cycle = {
466 this.cycle = {
467 label: label,
467 label: label,
468 cycleArray: this.sprite.animationCycles[label],
468 cycleArray: this.sprite.animationCycles[label],
@@ -470,7 +470,6 @@ class Renderer
470 current: defaultIndex,
470 current: defaultIndex,
471 cycleSpeed: cycleSpeed,
471 cycleSpeed: cycleSpeed,
472 timer: 0};
472 timer: 0};
473 }
474 }
473 }
475
474
476 setAnimationCycleSpeed(cycleSpeed)
475 setAnimationCycleSpeed(cycleSpeed)