public void forceTape(Transform t, string p, string s)
    {
        tape g = (Instantiate(tapePrefab, t.position, t.rotation) as GameObject).GetComponent <tape>();

        if (sampleManager.instance.sampleDictionary[p][s] != null)
        {
            g.Setup(s, sampleManager.instance.sampleDictionary[p][s]);
        }
        else
        {
            g.Setup(curSecondary, sampleManager.instance.sampleDictionary[curPrimary][curSecondary]);
        }
        t.GetComponent <manipulator>().ForceGrab(g);
        g.transform.localPosition = Vector3.zero;
        g.transform.localRotation = Quaternion.Euler(-90, -90, -90);//.zero;
    }
 void updateTape(string s, Transform t)
 {
     curSecondary = s;
     if (curTape != null)
     {
         Destroy(curTape.gameObject);
     }
     curTape = (Instantiate(tapePrefab, tapeHolder, false) as GameObject).GetComponent <tape>();
     curTape.Setup(s, sampleManager.instance.sampleDictionary[curPrimary][s]);
 }
 public override void updateTape(string s)
 {
     s           = System.IO.Path.GetFileNameWithoutExtension(s);
     curfilename = s;
     if (curTape != null)
     {
         Destroy(curTape.gameObject);
     }
     curTape = (Instantiate(tapePrefab, tapeHolder, false) as GameObject).GetComponent <tape>();
     curTape.Setup(s, sampleManager.instance.sampleDictionary["Recordings"][s]);
 }
    void createNewTape()
    {
        Vector3    p;
        Quaternion q;

        curTape.getOrigTrans(out p, out q);
        curTape.masterObj = null;
        curTape           = (Instantiate(tapePrefab, tapeHolder, false) as GameObject).GetComponent <tape>();

        curTape.transform.localPosition = p;
        curTape.Setup(curfilename, sampleManager.instance.sampleDictionary["Recordings"][curfilename]);
    }
Beispiel #5
0
    public void SetSample(string s, string f)
    {
        if (s == "")
        {
            return;
        }

        if (!File.Exists(sampleManager.instance.parseFilename(f)))
        {
            return;
        }

        GameObject g = Instantiate(tapePrefab, Vector3.zero, Quaternion.identity) as GameObject;

        g.transform.localRotation = Quaternion.Euler(-90, 0, 0);
        tape t = g.GetComponent <tape>();

        t.Setup(s, f);
        t.ForceLoad(deck);
    }