Beispiel #1
0
        private GVar GetVariable()
        {
            switch (location)
            {
            case VariableLocation.Global:
                VariablesManager variablesManager = AdvGame.GetReferences().variablesManager;
                if (variablesManager != null)
                {
                    return(variablesManager.GetVariable(variableID));
                }
                return(null);

            case VariableLocation.Local:
                return(LocalVariables.GetVariable(variableID));

            case VariableLocation.Component:
                if (variables != null)
                {
                    return(variables.GetVariable(variableID));
                }
                break;
            }

            return(null);
        }
Beispiel #2
0
		public bool IsTranslatable ()
		{
			if (setVarMethodString == SetVarMethodString.EnteredHere && setParameterID < 0)
			{
				GVar variable = null;

				if (location == VariableLocation.Global)
				{
					VariablesManager variablesManager = AdvGame.GetReferences ().variablesManager;
					if (variablesManager != null)
					{
						variable = variablesManager.GetVariable (variableID);
					}
				}
				else
				{
					variable = LocalVariables.GetVariable (variableID);
				}

				if (variable != null && variable.type == VariableType.String)
				{
					return true;
				}
			}
			return false;
		}
Beispiel #3
0
 private GVar GetVariable()
 {
     if (location == VariableLocation.Global)
     {
         VariablesManager variablesManager = AdvGame.GetReferences().variablesManager;
         if (variablesManager != null)
         {
             return(variablesManager.GetVariable(variableID));
         }
         return(null);
     }
     else
     {
         return(LocalVariables.GetVariable(variableID));
     }
 }