Esempio n. 1
0
 private void OnMouseDown()
 {
     if (!mgr.attached)
     {
         var item             = Instantiate(target, transform.position, transform.rotation);
         var instantiatedItem = item.GetComponent <placeable>();
         instantiatedItem.pivot          = pivot;
         instantiatedItem.pivotrb        = pivotrb;
         instantiatedItem.rb.isKinematic = false;
         instantiatedItem.MyOnMouseDown();
         mgr.attach(item.gameObject);
     }
 }