예제 #1
0
        public void Initialize()
        {
            audioUnitPrefab = CreatePrefab();

            audioFactoryUnit = gameObject.AddComponent <FS.PrefabFactory.Scripts.FactoryUnit>();
            audioFactoryUnit.Initialize(audioUnitPrefab, 10);
        }
예제 #2
0
        public void Initialize()
        {
            if (__subsWordFactoryUnit == null)
            {
                __subsWordFactoryUnit = gameObject.AddComponent <FS.PrefabFactory.Scripts.FactoryUnit>();
                __subsWordFactoryUnit.Initialize(subsWordPrefab, 40);
            }

            if (__channelInfoFactoryUnit == null)
            {
                __channelInfoFactoryUnit = gameObject.AddComponent <FS.PrefabFactory.Scripts.FactoryUnit>();
                __channelInfoFactoryUnit.Initialize(channelInfoPrefab, 10);
            }

            if (subsCanvas == null)
            {
                Debug.LogError("SubsManagerUnit | SubsCanvas is null. This will cause errors");
            }

            if (subsSelectorTriggerAnchor == null)
            {
                Debug.LogError("SubsManagerUnit | SubsSelectorTriggerAnchor is null. This will cause errors");
            }

            if (subsSelectorUnit == null)
            {
                Debug.LogError("SubsManagerUnit | SubsSelectorUnit is null. This will cause errors");
            }

            if (dialogOwnerColors.Length < 10)
            {
                Debug.LogError("SubsManagerUnit | DialogOwnerColors array must have more than 10 colors");
            }

            if (channelRectTransforms.Length < 10)
            {
                Debug.LogError("SubsManagerUnit | SubsWrapperRectTransforms array must have more than 10 RectTransforms");
            }

            channelGraphicsRaycasters = new UnityEngine.UI.GraphicRaycaster[channelRectTransforms.Length];
            for (int i = 0; i < channelRectTransforms.Length; i++)
            {
                channelGraphicsRaycasters[i] = channelRectTransforms[i].GetComponentInParent <UnityEngine.UI.GraphicRaycaster>();
            }
        }
예제 #3
0
        public void Initialize()
        {
            if (phoneChannelPrefab == null)
            {
                Debug.LogErrorFormat("Prefab is not set on {0}", gameObject.GetPath());
            }

            if (phoneTriggerAnchor == null)
            {
                Debug.LogError("PhoneManagerUnit | PhoneTriggerAnchor is null. This will cause errors");
            }

            if (scoreTriggerAnchor == null)
            {
                Debug.LogError("PhoneManagerUnit | ScoreTriggerAnchors is null. This will cause errors");
            }

            __factoryUnit = gameObject.AddComponent <FS.PrefabFactory.Scripts.FactoryUnit>();
            __factoryUnit.Initialize(phoneChannelPrefab, 5);
        }