using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AudioSourceX : MonoBehaviour {

    public AudioSource source;
    public Transform transf;

    public static AudioSourceX Create(string name, Transform parent) {
        GameObject go = new GameObject(name);
        AudioSourceX asx= go.AddComponent<AudioSourceX>();
        asx.source = go.AddComponent<AudioSource>();
        asx.transf = go.transform;
        asx.transf.SetParent(parent);

        return asx;
    }
}
