public void Dispose() { if (Line != null) { Line.Dispose(); } if (Outline != null) { Outline.Dispose(); } if (Fill != null) { Fill.Dispose(); } if (Symbol != null) { Symbol.Dispose(); } //NS, 2013-09-17 if (DashLine != null) { DashLine.Dispose(); } //NS, 2013-09-23 //if (_pointBrush != null) //{ // _pointBrush.Dispose(); // _pointBrush = null; //} //NS, 2013-10-02 if (CircleLine != null) { CircleLine.Dispose(); } }
private void AddCircleLine() { GameObject c = null; c = Instantiate(Resources.Load("Prefab/CircleLine", typeof(GameObject)) as GameObject); c.transform.SetParent(transform); c.transform.localPosition = Vector3.zero; CircleLine = c.GetComponent <CircleLine>(); }
void Start() { initScale = transform.localScale; circle = GetComponent <CircleLine>(); hand = HandUIManager.GetHand(whichHand); uiColor = GetComponent <UIColor>(); minY = transform.localPosition.y; if (this.enabled) { Hide(); } }
void MakeOrbits(int electrons, int orbitCount) { int elRest = electrons; for (int i = 0; i <= orbitCount; i++) { GameObject orbit = new GameObject(); orbit.name = "Orbit" + i; orbit.transform.parent = transform; orbit.transform.localPosition = Vector3.zero; CircleLine myRing = Instantiate <CircleLine>(ring); myRing.SetOrbitCapacity(elAndO[i, 0]); myRing.SetElectronCount(elAndO[i, 1]); myRing.CreatePoints(orbitRadius * (i + 1)); myRing.transform.parent = transform; myRing.transform.localPosition = Vector3.zero; //Shell for Orbit GameObject Shell = Instantiate <GameObject>(pulseObj); Shell.transform.parent = orbit.transform; Shell.transform.localPosition = Vector3.zero; float sr = (i + 1) * orbitRadius * 2f; Shell.transform.localScale = new Vector3(sr, sr, sr); //Electrons for (int j = 0; j < orbitThreshold[i]; j++) { Electron ele = Instantiate <Electron>(myElectron); ele.transform.parent = orbit.transform; float partinCircle = (float)j / orbitThreshold[i]; ele.Arrange(i, orbitRadius, partinCircle); elRest--; if (elRest <= 0) { return; } } } }