move puzzle implementations out of engine
This commit is contained in:
22
Assets/Engine/Runtime/UI/Elements/PauseButton.cs
Normal file
22
Assets/Engine/Runtime/UI/Elements/PauseButton.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.UI.Elements
|
||||
{
|
||||
/// <summary>
|
||||
/// This component is responsible to change the icon of the pause button depending on the game state.
|
||||
/// </summary>
|
||||
public class PauseButton : MonoBehaviour
|
||||
{
|
||||
[BoxGroup("Internal")] [SerializeField]
|
||||
private Image icon;
|
||||
[BoxGroup("Internal")] [SerializeField]
|
||||
private Sprite pauseIcon, resumeIcon;
|
||||
|
||||
public bool Paused
|
||||
{
|
||||
set => icon.sprite = value ? resumeIcon : pauseIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user