BlueGit

timfa frameworkv3

default animation speed

timfa Tim · pushed by timfa

Authored 2022-10-19 · 4 years ago

Hash
ab969f12ad0b2b196d98d1bdc05f953e62d70859
Parent
9dfbf175
1 file changed +7 −0
framework/engine/objectComponents/renderer.js +7 −0
@@ -7,6 +7,8 @@ class Renderer
7 7 mirrorX = false;
8 8 mirrorY = false;
9 9
10 defaultAnimationSpeed = 1;
11
10 12 cycle = null;
11 13
12 14 visible = true;
@@ -124,6 +126,11 @@ class Renderer
124 126
125 127 setAnimation(label, defaultIndex = 0, cycleSpeed = -1)
126 128 {
129 if(cycleSpeed < 0)
130 {
131 cycleSpeed = this.defaultAnimationSpeed;
132 }
133
127 134 if(this.cycle)
128 135 {
129 136 if(this.cycle.label == label)
@@ -7,6 +7,8 @@ class Renderer
7 mirrorX = false;
7 mirrorX = false;
8 mirrorY = false;
8 mirrorY = false;
9
9
10 defaultAnimationSpeed = 1;
11
10 cycle = null;
12 cycle = null;
11
13
12 visible = true;
14 visible = true;
@@ -124,6 +126,11 @@ class Renderer
124
126
125 setAnimation(label, defaultIndex = 0, cycleSpeed = -1)
127 setAnimation(label, defaultIndex = 0, cycleSpeed = -1)
126 {
128 {
129 if(cycleSpeed < 0)
130 {
131 cycleSpeed = this.defaultAnimationSpeed;
132 }
133
127 if(this.cycle)
134 if(this.cycle)
128 {
135 {
129 if(this.cycle.label == label)
136 if(this.cycle.label == label)