Patch bouton relance DeathScreen
This commit is contained in:
parent
4181b857e1
commit
4c350d16a4
@ -131,6 +131,7 @@ GameObject:
|
||||
- component: {fileID: 28337889}
|
||||
- component: {fileID: 28337888}
|
||||
- component: {fileID: 28337887}
|
||||
- component: {fileID: 28337891}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
@ -224,6 +225,19 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &28337891
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 28337886}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5827ef60d322c73468e816b5411af65a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
restartButton: {fileID: 585937283}
|
||||
--- !u!1 &187417856
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -769,7 +769,7 @@ RectTransform:
|
||||
m_GameObject: {fileID: 1425101073}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 10, y: 5, z: 1}
|
||||
m_LocalScale: {x: 9.5, y: 6, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 28337890}
|
||||
|
25
Assets/Scripts/Utils/RestartButton.cs
Normal file
25
Assets/Scripts/Utils/RestartButton.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RestartButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] public Button restartButton;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (restartButton != null)
|
||||
{
|
||||
restartButton.onClick.AddListener(RestartGame);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("RestartButton is not assigned in the inspector!");
|
||||
}
|
||||
}
|
||||
|
||||
public void RestartGame()
|
||||
{
|
||||
SceneManager.LoadScene("GameScene");
|
||||
}
|
||||
}
|
2
Assets/Scripts/Utils/RestartButton.cs.meta
Normal file
2
Assets/Scripts/Utils/RestartButton.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5827ef60d322c73468e816b5411af65a
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user