Esempio n. 1
0
        public void AddSoundAudioSource(string name, string asset)
        {
            var         clip        = assetSource.GetAsset <AudioClip>(asset);
            AudioSource audioSource = gameObject.AddComponent <AudioSource>();

            audioSource.clip        = clip;
            soundAudioSources[name] = audioSource;
        }
        public void RegisterBackgroundFromAssetSource(string name, string tag, string assetTag)
        {
            //throw new System.NotImplementedException();
            if (!backgroundGroups.ContainsKey(tag))
            {
                backgroundGroups[tag] = new List <string>();
            }
            backgroundGroups[tag].Add(name);
            var viewObject = Instantiate(assetSource.GetAsset <GameObject>(assetTag), backgroundLayerParent);

            backgroundViews[name] = viewObject;
            viewObject.SetActive(false);
        }
        public IActor Create(string uri)
        {
            var go = GameObject.Instantiate(assetSource.GetAsset <GameObject>(uri));

            return(go.GetComponentInChildren <IActor>());
        }