Пример #1
0
 void OnCollisionStay2D(Collision2D target)
 {
     if (target.gameObject.name == "Player")
     {
         MoveUp = false;
         target.transform.SetParent(this.transform);
         if (!soundPlayed)
         {
             ActiveSound();
         }
         this.transform.position = Vector3.MoveTowards(transform.position, new Vector3(originalPos.x, originalPos.y - 10, originalPos.z), 20 * Time.deltaTime);
         Toggle(true);
         if (Spike != null)
         {
             Spike.Escape();
         }
     }
 }