|
@@ -14,13 +14,12 @@ namespace GFGGame
|
|
|
{
|
|
|
protected Color32[] _backupColor32s;
|
|
|
protected Color32[] _color32s;
|
|
|
- protected float charFadeDuration = 0.3f;
|
|
|
-
|
|
|
-
|
|
|
- private float _currentCharFadeTime;
|
|
|
|
|
|
public Action typeFinishedAction;
|
|
|
- public float progressShowNextWord = 0.06f;
|
|
|
+ // 出现下一个字符的间隔
|
|
|
+ public float showNextWordInternal = 0.06f;
|
|
|
+ // 字符渐变时间
|
|
|
+ protected float charFadeDuration = 0.08f;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -50,7 +49,6 @@ namespace GFGGame
|
|
|
_mainLayerVertCount = 0;
|
|
|
_printIndex = 0;
|
|
|
_vertIndex = 0;
|
|
|
- _currentCharFadeTime = 0.0f;
|
|
|
_started = true;
|
|
|
|
|
|
int vertCount = _textField.graphics.mesh.vertexCount;
|
|
@@ -215,7 +213,7 @@ namespace GFGGame
|
|
|
if (!_started)
|
|
|
break;
|
|
|
|
|
|
- if(timer>= progressShowNextWord)
|
|
|
+ if(timer>= showNextWordInternal)
|
|
|
{
|
|
|
timer = 0;
|
|
|
if (_printIndex >= listCnt - 1)
|
|
@@ -270,7 +268,8 @@ namespace GFGGame
|
|
|
|
|
|
public void SetSpeed(float speed)
|
|
|
{
|
|
|
- charFadeDuration = speed;
|
|
|
+ charFadeDuration /= speed;
|
|
|
+ showNextWordInternal /= speed;
|
|
|
}
|
|
|
|
|
|
}
|