コード例 #1
0
 void AttachToTarget(Rigidbody2D r)
 {
     if (!targets.Contains(r))
     {
         targets.Add(r);
         Sticker sticker = Instantiate(joint, transform).GetComponent <Sticker>();
         sticker.AddTarget(r);
         sticker.OnBreakEvent += Deregister;
     }
 }