parent
2ebeccfa69
commit
c436a73f5c
File diff suppressed because one or more lines are too long
BIN
Assets/LYM/Scenes/MainUI.unity
(Stored with Git LFS)
BIN
Assets/LYM/Scenes/MainUI.unity
(Stored with Git LFS)
Binary file not shown.
@ -15,7 +15,7 @@ public class PopupPanelController : PanelController
|
||||
private OnContradictDelegate _onContradictDelegate;
|
||||
private void Start()
|
||||
{
|
||||
Show(false, "", () => {});
|
||||
Show(false, "수면에 들 시간입니다.", () => {});
|
||||
}
|
||||
|
||||
public void Show(bool isNeed2Contradict, string message, OnConfirmDelegate onConfirm)
|
||||
|
18
Assets/LYM/Scripts/SettingsPanelController.cs
Normal file
18
Assets/LYM/Scripts/SettingsPanelController.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SettingsPanelController : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/LYM/Scripts/SettingsPanelController.cs.meta
Normal file
11
Assets/LYM/Scripts/SettingsPanelController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b8049d4c0267dd4481865a0eb1d5c3e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
39
Assets/LYM/Scripts/SliderButton.cs
Normal file
39
Assets/LYM/Scripts/SliderButton.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
|
||||
public class SliderButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image backgroundImage;
|
||||
[SerializeField] private GameObject handle;
|
||||
|
||||
public bool IsActive { get; private set; }
|
||||
private int _offXLocation = -15;
|
||||
private int _onXLocation = 15;
|
||||
private Color32 _offColor = new Color32(125, 125, 125, 255);
|
||||
private Color32 _onColor = new Color32(70, 255, 90, 255);
|
||||
|
||||
|
||||
public void Init(bool isActive)
|
||||
{
|
||||
IsActive = isActive;
|
||||
var xLocation = IsActive ? _onXLocation : _offXLocation;
|
||||
handle.transform.localPosition = new Vector3(xLocation, handle.transform.localPosition.y, 0);
|
||||
}
|
||||
|
||||
public void OnClicked()
|
||||
{
|
||||
if (IsActive)
|
||||
{
|
||||
handle.transform.DOLocalMoveX(_offXLocation, 0.2f);
|
||||
backgroundImage.DOColor()
|
||||
}
|
||||
else
|
||||
{
|
||||
handle.transform.DOLocalMoveX(_onXLocation, 0.2f);
|
||||
}
|
||||
IsActive = !IsActive;
|
||||
}
|
||||
}
|
11
Assets/LYM/Scripts/SliderButton.cs.meta
Normal file
11
Assets/LYM/Scripts/SliderButton.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0da16f0ed11a3b14b9cf497a46f7abba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user