public ScriptValue GetValueByIndex(int key, Script script) { switch (valueType) { case scriptValueType: return(scriptValue.GetValueByIndex(key)); case doubleValueType: case longValueType: return(script.TypeNumber.GetValueByIndex(key)); case stringValueType: return(script.TypeString.GetValueByIndex(key)); case trueValueType: case falseValueType: return(script.TypeBoolean.GetValueByIndex(key)); default: throw new ExecutionException($"类型[{ValueTypeName}]不支持获取变量 Index : [{key}]"); } }