public Entity AddMusic(Res.audios newClip)
        {
            var component = CreateComponent <MusicComponent>(InputComponentIds.Music);

            component.clip = newClip;
            return(AddComponent(InputComponentIds.Music, component));
        }
        public Entity AddEfxSound(Res.audios newClip)
        {
            var component = CreateComponent <EfxSoundComponent>(InputComponentIds.EfxSound);

            component.clip = newClip;
            return(AddComponent(InputComponentIds.EfxSound, component));
        }
        public Entity ReplaceMusic(Res.audios newClip)
        {
            var component = CreateComponent <MusicComponent>(InputComponentIds.Music);

            component.clip = newClip;
            ReplaceComponent(InputComponentIds.Music, component);
            return(this);
        }
        public Entity ReplaceEfxSound(Res.audios newClip)
        {
            var component = CreateComponent <EfxSoundComponent>(InputComponentIds.EfxSound);

            component.clip = newClip;
            ReplaceComponent(InputComponentIds.EfxSound, component);
            return(this);
        }
        public Entity SetMusic(Res.audios newClip)
        {
            if (hasMusic)
            {
                throw new EntitasException("Could not set music!\n" + this + " already has an entity with MusicComponent!",
                                           "You should check if the pool already has a musicEntity before setting it or use pool.ReplaceMusic().");
            }
            var entity = CreateEntity();

            entity.AddMusic(newClip);
            return(entity);
        }
        public Entity ReplaceMusic(Res.audios newClip)
        {
            var entity = musicEntity;

            if (entity == null)
            {
                entity = SetMusic(newClip);
            }
            else
            {
                entity.ReplaceMusic(newClip);
            }

            return(entity);
        }