mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2025-05-18 12:02:58 +02:00
25 lines
469 B
C#
25 lines
469 B
C#
using UnityEngine;
|
|
|
|
public class LevelPreviousButton : MonoBehaviour
|
|
{
|
|
public LevelsLoader levelsLoader;
|
|
|
|
public void Start()
|
|
{
|
|
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.LeftArrow))
|
|
{
|
|
PreviousLevel();
|
|
}
|
|
}
|
|
|
|
public void PreviousLevel()
|
|
{
|
|
levelsLoader.PreviousLevel();
|
|
}
|
|
}
|