BlueGit

blue-star speeltuin

raamwerk opdatum

timfa Tim · pushed by timfa

Authored 2022-10-18 · 4 years ago

Hash
0dc1785be9acbe6396159f239669f77e410f8e8a
Parent
4e5132c9
1 file changed +6 −6
build/framework.js +6 −6
@@ -218,12 +218,12 @@ class image{
218 218 }
219 219 }
220 220
221 addAnimationCycle(label, cycle, loops, chain, chainDefaultIndex, chainSpeed)
221 addAnimationCycle(label, cycle, loop, chain, chainDefaultIndex, chainSpeed)
222 222 {
223 223 this.animationCycles[label] =
224 224 {
225 225 frames: cycle,
226 loop: loops,
226 loop: loop,
227 227 chain: chain,
228 228 chainDefaultIndex: chainDefaultIndex,
229 229 chainSpeed: chainSpeed
@@ -404,7 +404,7 @@ class Renderer
404 404 {
405 405 if(!this.cycle.cycleSpeed || this.cycle.cycleSpeed == -1)
406 406 {
407 this.subImage = this.cycle.default;
407 this.subImage = this.cycle.cycleArray[this.cycle.default];
408 408 this.cycle.current = this.cycle.default;
409 409 return;
410 410 }
@@ -487,8 +487,8 @@ class Renderer
487 487 this.sprite.draw(
488 488 this.gameObject.scene,
489 489 sx, sy, sw, sh,
490 this.gameObject.transform.position.x,
491 this.gameObject.transform.position.y,
490 Math.round(this.gameObject.transform.position.x),
491 Math.round(this.gameObject.transform.position.y),
492 492 this.gameObject.transform.size.x,
493 493 this.gameObject.transform.size.y,
494 494 this.gameObject.transform.rotation,
@@ -498,7 +498,7 @@ class Renderer
498 498 );
499 499 }
500 500
501 setAnimation(label, defaultIndex, cycleSpeed = -1)
501 setAnimation(label, defaultIndex = 0, cycleSpeed = -1)
502 502 {
503 503 if(this.cycle)
504 504 {
@@ -218,12 +218,12 @@ class image{
218 }
218 }
219 }
219 }
220
220
221 addAnimationCycle(label, cycle, loops, chain, chainDefaultIndex, chainSpeed)
221 addAnimationCycle(label, cycle, loop, chain, chainDefaultIndex, chainSpeed)
222 {
222 {
223 this.animationCycles[label] =
223 this.animationCycles[label] =
224 {
224 {
225 frames: cycle,
225 frames: cycle,
226 loop: loops,
226 loop: loop,
227 chain: chain,
227 chain: chain,
228 chainDefaultIndex: chainDefaultIndex,
228 chainDefaultIndex: chainDefaultIndex,
229 chainSpeed: chainSpeed
229 chainSpeed: chainSpeed
@@ -404,7 +404,7 @@ class Renderer
404 {
404 {
405 if(!this.cycle.cycleSpeed || this.cycle.cycleSpeed == -1)
405 if(!this.cycle.cycleSpeed || this.cycle.cycleSpeed == -1)
406 {
406 {
407 this.subImage = this.cycle.default;
407 this.subImage = this.cycle.cycleArray[this.cycle.default];
408 this.cycle.current = this.cycle.default;
408 this.cycle.current = this.cycle.default;
409 return;
409 return;
410 }
410 }
@@ -487,8 +487,8 @@ class Renderer
487 this.sprite.draw(
487 this.sprite.draw(
488 this.gameObject.scene,
488 this.gameObject.scene,
489 sx, sy, sw, sh,
489 sx, sy, sw, sh,
490 this.gameObject.transform.position.x,
490 Math.round(this.gameObject.transform.position.x),
491 this.gameObject.transform.position.y,
491 Math.round(this.gameObject.transform.position.y),
492 this.gameObject.transform.size.x,
492 this.gameObject.transform.size.x,
493 this.gameObject.transform.size.y,
493 this.gameObject.transform.size.y,
494 this.gameObject.transform.rotation,
494 this.gameObject.transform.rotation,
@@ -498,7 +498,7 @@ class Renderer
498 );
498 );
499 }
499 }
500
500
501 setAnimation(label, defaultIndex, cycleSpeed = -1)
501 setAnimation(label, defaultIndex = 0, cycleSpeed = -1)
502 {
502 {
503 if(this.cycle)
503 if(this.cycle)
504 {
504 {