更新至unity6并且更改Scriptable完成
This commit is contained in:
@@ -128,15 +128,6 @@ namespace Demo.Game
|
||||
|
||||
public const int JudgementLevelCount = 3;
|
||||
|
||||
public override IEnumerator LoadScript(string script)
|
||||
{
|
||||
yield return base.LoadScript(script);
|
||||
if (BestJudgementTimePoint <= 0)
|
||||
{
|
||||
DoSetupJudgement(0);
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerator UnloadScript()
|
||||
{
|
||||
yield return base.UnloadScript();
|
||||
@@ -324,9 +315,9 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="bestJudgementTimePoint">最佳判定点</param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetupJudgement(string bestJudgementTimePoint)
|
||||
public void SetupJudgement(float bestJudgementTimePoint)
|
||||
{
|
||||
DoSetupJudgement(Parse(bestJudgementTimePoint));
|
||||
DoSetupJudgement(bestJudgementTimePoint);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -343,18 +334,18 @@ namespace Demo.Game
|
||||
/// (bestJudgementTimePoint-visibleDuration/2,bestJudgementTimePoint+visibleDuration/2)</param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetupJudgementLevels(
|
||||
string bestJudgementTimePoint,
|
||||
string interactableIntervalThatCanScoreBest,
|
||||
string interactableScoreInterval,
|
||||
string interactiveDuration,
|
||||
string visibleDuration)
|
||||
float bestJudgementTimePoint,
|
||||
float interactableIntervalThatCanScoreBest,
|
||||
float interactableScoreInterval,
|
||||
float interactiveDuration,
|
||||
float visibleDuration)
|
||||
{
|
||||
DoSetupJudgementLevels(
|
||||
Parse(bestJudgementTimePoint),
|
||||
Parse(interactableIntervalThatCanScoreBest),
|
||||
Parse(interactableScoreInterval),
|
||||
Parse(interactiveDuration),
|
||||
Parse(visibleDuration));
|
||||
bestJudgementTimePoint,
|
||||
interactableIntervalThatCanScoreBest,
|
||||
interactableScoreInterval,
|
||||
interactiveDuration,
|
||||
visibleDuration);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -362,18 +353,18 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetVisibleDurationBegin(string value)
|
||||
public void SetVisibleDurationBegin(float value)
|
||||
{
|
||||
VisibleDuration.x = Parse(value);
|
||||
VisibleDuration.x = value;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置可见区间(显现但不可判定,3级判定区间)结束时间
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetVisibleDurationEnd(string value)
|
||||
public void SetVisibleDurationEnd(float value)
|
||||
{
|
||||
VisibleDuration.y = Parse(value);
|
||||
VisibleDuration.y = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -381,18 +372,18 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractiveDurationBegin(string value)
|
||||
public void SetInteractiveDurationBegin(float value)
|
||||
{
|
||||
InteractiveDuration.x = Parse(value);
|
||||
InteractiveDuration.x = value;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置2级判定区间(可判定但错误的)结束时间
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractiveDurationEnd(string value)
|
||||
public void SetInteractiveDurationEnd(float value)
|
||||
{
|
||||
InteractiveDuration.y = Parse(value);
|
||||
InteractiveDuration.y = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -400,18 +391,18 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractableScoreIntervalBegin(string value)
|
||||
public void SetInteractableScoreIntervalBegin(float value)
|
||||
{
|
||||
InteractableScoreInterval.x = Parse(value);
|
||||
InteractableScoreInterval.x = value;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置1级判定区间(可判定的)结束时间
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractableScoreIntervalEnd(string value)
|
||||
public void SetInteractableScoreIntervalEnd(float value)
|
||||
{
|
||||
InteractableScoreInterval.y = Parse(value);
|
||||
InteractableScoreInterval.y = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -419,9 +410,9 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractableIntervalThatCanScoreBestBegin(string value)
|
||||
public void SetInteractableIntervalThatCanScoreBestBegin(float value)
|
||||
{
|
||||
InteractableIntervalThatCanScoreBest.x = Parse(value);
|
||||
InteractableIntervalThatCanScoreBest.x = value;
|
||||
if (BestJudgementTimePoint < 0)
|
||||
{
|
||||
BestJudgementTimePoint = Mathf.Lerp(InteractableIntervalThatCanScoreBest.x, InteractableIntervalThatCanScoreBest.y, 0.5f);
|
||||
@@ -432,9 +423,9 @@ namespace Demo.Game
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void SetInteractableIntervalThatCanScoreBestEnd(string value)
|
||||
public void SetInteractableIntervalThatCanScoreBestEnd(float value)
|
||||
{
|
||||
InteractableIntervalThatCanScoreBest.y = Parse(value);
|
||||
InteractableIntervalThatCanScoreBest.y = value;
|
||||
if (BestJudgementTimePoint < 0)
|
||||
{
|
||||
BestJudgementTimePoint = Mathf.Lerp(InteractableIntervalThatCanScoreBest.x, InteractableIntervalThatCanScoreBest.y, 0.5f);
|
||||
|
||||
Reference in New Issue
Block a user