Example #1
0
    public static void SetSceneItem(string name, string feature, string value)
    {
        GameObject objSelected = Global.Control(name, Loader.Instance.gameObject);

        if (objSelected == null)
        {
            //Debug.LogError(name + " can not find");
            return;
        }
        SceneItemAgent agent = objSelected.GetComponent <SceneItemAgent>();

        if (agent != null)
        {
            agent.SetSceneItem(feature, value);
        }
    }
Example #2
0
    public static void SetSceneItem(string name, string features, string sub_features, int value)
    {
        if (sceneRoot == null)
        {
            sceneRoot = FindObjectOfType <Loader>();
        }
        GameObject objSelected = Global.Control(name, sceneRoot.gameObject);

        if (objSelected == null)
        {
            //Debug.LogError(name + " can not find");
            return;
        }
        SceneItemAgent agent = objSelected.GetComponent <SceneItemAgent>();

        if (agent != null)
        {
            agent.SetSceneItem(features, sub_features, value);
        }
    }
Example #3
0
    public static void SetSceneItem(int id, string feature, string value)
    {
        SceneItemAgent objSelected = null;

        SceneItemAgent[] agents = FindObjectsOfType <SceneItemAgent>();
        for (int i = 0; i < agents.Length; i++)
        {
            if (agents[i].InstanceId == id)
            {
                objSelected = agents[i];
                break;
            }
        }
        if (objSelected == null)
        {
            //Debug.LogError("id: " + id + " can not find");
            return;
        }
        if (objSelected != null)
        {
            objSelected.SetSceneItem(feature, value);
        }
    }