Пример #1
0
    override public float Run()
    {
        RuntimeVariables runtimeVariables = GameObject.FindWithTag(Tags.persistentEngine).GetComponent <RuntimeVariables>();

        if (runtimeVariables)
        {
            if (variableID != -1 && runtimeVariables.localVars.Count > 0)
            {
                if (runtimeVariables.GetVarType(variableID) == VariableType.Integer)
                {
                    runtimeVariables.SetValue(variableID, intValue, isCumulative);
                }
                else
                {
                    runtimeVariables.SetValue(variableID, (int)boolValue, false);
                }
            }
        }

        return(0f);
    }