Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Assets/Resources/Data/RestartButton.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2842be317ca44ac1a2deed540475b267, type: 3}
m_Name: UnitSettings
m_EditorClassIdentifier:
Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
_speed: 9.8
8 changes: 8 additions & 0 deletions Assets/Resources/Data/RestartButton.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/RestartButton1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RestartButton1 : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions Assets/RestartButton1.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/Scripts/Controller/GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ private void LateUpdate()
_controllers.LateExecute(deltaTime);
}



private void OnDestroy()
{
_controllers.Cleanup();
Expand Down
18 changes: 18 additions & 0 deletions Assets/Scripts/Controller/NewBehaviourScript.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions Assets/Scripts/Controller/NewBehaviourScript.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions Assets/Scripts/Data/RestartButton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

namespace MVCExample
{
public sealed class Reference
{

private Canvas _canvas;
private Button _restartButton;

public Canvas Canvas
{
get
{
if (_canvas == null)
{
_canvas = Object.FindObjectOfType<Canvas>();
}
return _canvas;
}
}

public Button RestartButton
{
get
{
if (_restartButton == null)
{
var gameObject = Resources.Load<Button>("UI/RestartButton");
_restartButton = Object.Instantiate(gameObject, Canvas.transform);
}

return _restartButton;
}
}

}

}
11 changes: 11 additions & 0 deletions Assets/Scripts/Data/RestartButton.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Scripts/Interface/LevelRestart.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LevelRestart : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions Assets/Scripts/Interface/LevelRestart.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.