private void Awake() { // children ie points to appear on globe c0 = this.gameObject.transform.GetChild(0); c1 = this.gameObject.transform.GetChild(1); c2 = this.gameObject.transform.GetChild(2); c3 = this.gameObject.transform.GetChild(3); c4 = this.gameObject.transform.GetChild(4); c5 = this.gameObject.transform.GetChild(5); c6 = this.gameObject.transform.GetChild(6); c7 = this.gameObject.transform.GetChild(7); c8 = this.gameObject.transform.GetChild(8); c9 = this.gameObject.transform.GetChild(9); ip = this.gameObject.GetComponent <IPArray>(); GlobeOrigin = this.transform.position; // is questionable if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
public virtual void AddAll(ILink <T> link) { int n = link.Length; reserveSpace(n); if (link is IPArray <T> ) { IPArray <T> src = (IPArray <T>)link; for (int i = 0, j = used; i < n; i++, j++) { arr[j] = src.GetOid(i); } } else { for (int i = 0, j = used; i < n; i++, j++) { arr[j] = db.MakePersistent(link.GetRaw(i)); } } used += n; }
internal ArrayEnumerator(IPArray <T> arr) { this.arr = arr; i = -1; }