#230 CozyManager 추가

This commit is contained in:
NTG 2024-04-02 02:46:53 +09:00
parent dba82d7d05
commit 6fa993ca16
6 changed files with 16761 additions and 16558 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ namespace BlueWaterProject
FOG
}
public class CozyController : MonoBehaviour
public class CozyManager : Singleton<CozyManager>
{
/***********************************************************************
* Definitions
@ -92,6 +92,8 @@ namespace BlueWaterProject
[SerializeField] private float changeWeatherTime;
public WeatherInfo CurrentWeatherInfo => weatherInfoList[0];
public WeatherType CurrentWeatherType => weatherInfoList[0].WeatherType;
public MeridiemTime CurrentTime => CozyWeather.instance.timeModule.currentTime;
private float totalRatio;
@ -143,7 +145,7 @@ namespace BlueWaterProject
#region Methods
[Button("날짜 변경")]
public void SetCurrentDat(int day) => CozyWeather.instance.timeModule.currentDay = day;
public void SetCurrentDay(int day) => CozyWeather.instance.timeModule.currentDay = day;
[Button("현재 시간 변경")]
public void SetCurrentTime(int hour, int minute)
@ -220,8 +222,6 @@ namespace BlueWaterProject
return defaultWeatherInfo;
}
public WeatherType GetCurrentWeatherType() => weatherInfoList[0].WeatherType;
#endregion
}
}

View File

@ -3,6 +3,7 @@ using System.Collections;
using DistantLands.Cozy;
using TMPro;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
// ReSharper disable once CheckNamespace
@ -16,7 +17,7 @@ namespace BlueWaterProject
[field: SerializeField] public Image WeatherIcon { get; set; }
[SerializeField] private float updateTime = 1f;
[SerializeField] private CozyController cozyController;
[FormerlySerializedAs("cozyController")] [SerializeField] private CozyManager cozyManager;
private void Start()
{
@ -29,7 +30,7 @@ namespace BlueWaterProject
{
Date.text = CozyWeather.instance.timeModule.currentDay + " Days";
Time.text = CozyWeather.instance.timeModule.currentTime.ToString();
WeatherIcon.sprite = cozyController.CurrentWeatherInfo.Sprite;
WeatherIcon.sprite = cozyManager.CurrentWeatherInfo.Sprite;
yield return new WaitForSeconds(updateTime);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: be1d50d0f9a83864698b17f9e155db2d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: