void Awake() { if (instance == null) { instance = this; } }
void Awake() { //Get Root Transform. objectSlot = GameObject.Find("UISlot").transform; UICamera = GameObject.Find("UICamera").GetComponent <Camera>(); UISlot = GameObject.Find("UISlot").GetComponent <ImageUISlot> (); objectRoot = GameObject.Find("ObjectRoot").transform; objectWrapper = this.transform.parent; scale = this.transform.localScale; // objectRigidbody.Sleep (); updateMotion = updateUIMotion; }
void _createObject(int id) { //Image Load At Wrapper GameObject imageUIObject = Instantiate(ImageUIObjectPrefab, null) as GameObject; ImageUIObject imageUIObjectScript = imageUIObject.GetComponent <ImageUIObject> (); imageUIObjectScript.Init(id); if (id < 7) { imageUIObjectScript.Create(ImageUISlot.GetWrapper(id)); } else { imageObjectList.Add(imageUIObject); } }