mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2024-12-18 21:44:51 +01:00
24 lines
523 B
C#
24 lines
523 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;
|
|
}
|
|
}
|