mirror of
				https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
				synced 2025-06-27 11:58:51 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			565 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			565 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using UnityEngine;
 | 
						|
 | 
						|
public class SpikeScript : MonoBehaviour
 | 
						|
{
 | 
						|
    public PlayerScript playerScript;
 | 
						|
    public GameObject playerObject;
 | 
						|
 | 
						|
    public void Start()
 | 
						|
    {
 | 
						|
        playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>();
 | 
						|
    }
 | 
						|
 | 
						|
    public void Update()
 | 
						|
    {
 | 
						|
 | 
						|
    }
 | 
						|
 | 
						|
    public void OnTriggerEnter2D(Collider2D collision)
 | 
						|
    {
 | 
						|
        playerObject.transform.rotation = playerScript.initialRotation;
 | 
						|
        playerObject.transform.position = playerScript.initialPosition;
 | 
						|
        playerScript.isColliding = false;
 | 
						|
    }
 | 
						|
}
 |