Esempio n. 1
0
        public override void OnAwake()
        {
            base.OnAwake();
            webManager = new WebManager();
            if (instanceRoot == null)
            {
                instanceRoot = (new GameObject("Web Request Root")).transform;
                instanceRoot.SetParent(gameObject.transform);
                instanceRoot.localScale    = Vector3.one;
                instanceRoot.localPosition = Vector3.zero;
            }

            for (int i = 0; i < SingletonMono <GameFramework> .GetInstance().WebRequestCount; i++)
            {
                WebAgent webAgent = new GameObject("WebRequest_" + (i + 1)).AddComponent <WebAgent>();
                webAgent.transform.SetParent(instanceRoot);
                webAgent.transform.localPosition = Vector3.zero;
                webAgent.transform.localScale    = Vector3.one;
                webManager.AddWebRequestAgent(webAgent);
            }
        }