public void UnloadTape(tape t) { if (currentTape == t) { currentTape = null; if (_streamRoutine != null) { if (loaderObject != null) { Destroy(loaderObject); } StopCoroutine(_streamRoutine); } if (miniSpeaker != null) { miniSpeaker.updateSecondary(false); } // unallocate memory m_ClipHandle.Free(); for (int i = 0; i < players.Length; i++) { players[i].UnloadClip(); } } }
public void ForceEject() { if (currentTape != null) { tape temp = currentTape; UnloadTape(currentTape); temp.Eject(); } }
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]); }
public void LoadTape(tape t) { if (currentTape != null && currentTape != t) { ForceEject(); } currentTape = t; CurTapeLabel = t.label; CurFile = t.filename; if (miniSpeaker != null) { miniSpeaker.updateSecondary(true); } LoadClip(t.filename); }
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; }
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); }
static void Main(string[] args) { AdhesiveTape tape1 = new AdhesiveTape(); VideoTape tape2 = new VideoTape(); Tape tape3 = new tape(); tape1.stick = 6; tape1.length = 7; tape1.width = 4; Console.WriteLine("Tape 1 stick is {0}", tape1.stick); tape2.PlayingTime = 95; tape2.length = 5; tape2.width = 2; Console.WriteLine("Tape 2 length is {0} minutes long", tape2.PlayingTime); tape3.length = 12; tape3.width = 10; Console.WriteLine("Tape 3 is {0} feet long", tape3.Length); }