day transition working again
This commit is contained in:
parent
51ab23d3e1
commit
b0ab924037
3 changed files with 8 additions and 9 deletions
|
|
@ -21,7 +21,7 @@ AnimatorState:
|
|||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 9d881ff38c04aeb47bc53481c78adcd7, type: 2}
|
||||
m_Motion: {fileID: 7400000, guid: 4daa8bd091fad8d45b7e8df57ac7f909, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
|
|
@ -47,7 +47,7 @@ AnimatorState:
|
|||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 4daa8bd091fad8d45b7e8df57ac7f909, type: 2}
|
||||
m_Motion: {fileID: 7400000, guid: 9d881ff38c04aeb47bc53481c78adcd7, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
|
|
|
|||
|
|
@ -1456,7 +1456,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
dayTransitionAnimator: {fileID: 496797769}
|
||||
dayCountText: {fileID: 1235858074}
|
||||
sleepButton: {fileID: 880320856}
|
||||
sleepButton: {fileID: 880320858}
|
||||
--- !u!4 &401600533
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1988,7 +1988,7 @@ MonoBehaviour:
|
|||
m_TargetGraphic: {fileID: 2006577139}
|
||||
m_HandleRect: {fileID: 2006577138}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Value: 0.9999999
|
||||
m_Size: 0.5386614
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
|
|
@ -5725,7 +5725,7 @@ MonoBehaviour:
|
|||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4280111227
|
||||
rgba: 85807227
|
||||
m_fontColor: {r: 0.48235297, g: 0.3137255, b: 0.1137255, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
|
@ -7,14 +6,14 @@ using UnityEngine.UI;
|
|||
public class DayTransitionManager : MonoBehaviour {
|
||||
public Animator dayTransitionAnimator;
|
||||
public TextMeshProUGUI dayCountText;
|
||||
public GameObject sleepButton;
|
||||
public Button sleepButton;
|
||||
|
||||
private void Start() {
|
||||
HouseController.NewDayEvent.AddListener(NewDay);
|
||||
}
|
||||
|
||||
private void NewDay() {
|
||||
sleepButton.GetComponent<Button>().enabled = false;
|
||||
sleepButton.enabled = false;
|
||||
dayTransitionAnimator.gameObject.SetActive(true);
|
||||
StartCoroutine(PlayTransition());
|
||||
}
|
||||
|
|
@ -23,7 +22,7 @@ public class DayTransitionManager : MonoBehaviour {
|
|||
dayCountText.text = "Day " + HouseController.DayCount;
|
||||
|
||||
yield return new WaitForSeconds(3f);
|
||||
sleepButton.GetComponent<Button>().enabled = true;
|
||||
sleepButton.enabled = true;
|
||||
dayTransitionAnimator.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue