#230 CozyManager 추가
This commit is contained in:
parent
dba82d7d05
commit
6fa993ca16
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ namespace BlueWaterProject
|
|||||||
FOG
|
FOG
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CozyController : MonoBehaviour
|
public class CozyManager : Singleton<CozyManager>
|
||||||
{
|
{
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@ -92,6 +92,8 @@ namespace BlueWaterProject
|
|||||||
[SerializeField] private float changeWeatherTime;
|
[SerializeField] private float changeWeatherTime;
|
||||||
|
|
||||||
public WeatherInfo CurrentWeatherInfo => weatherInfoList[0];
|
public WeatherInfo CurrentWeatherInfo => weatherInfoList[0];
|
||||||
|
public WeatherType CurrentWeatherType => weatherInfoList[0].WeatherType;
|
||||||
|
public MeridiemTime CurrentTime => CozyWeather.instance.timeModule.currentTime;
|
||||||
|
|
||||||
private float totalRatio;
|
private float totalRatio;
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ namespace BlueWaterProject
|
|||||||
#region Methods
|
#region Methods
|
||||||
|
|
||||||
[Button("날짜 변경")]
|
[Button("날짜 변경")]
|
||||||
public void SetCurrentDat(int day) => CozyWeather.instance.timeModule.currentDay = day;
|
public void SetCurrentDay(int day) => CozyWeather.instance.timeModule.currentDay = day;
|
||||||
|
|
||||||
[Button("현재 시간 변경")]
|
[Button("현재 시간 변경")]
|
||||||
public void SetCurrentTime(int hour, int minute)
|
public void SetCurrentTime(int hour, int minute)
|
||||||
@ -220,8 +222,6 @@ namespace BlueWaterProject
|
|||||||
return defaultWeatherInfo;
|
return defaultWeatherInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeatherType GetCurrentWeatherType() => weatherInfoList[0].WeatherType;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||||||
using DistantLands.Cozy;
|
using DistantLands.Cozy;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
@ -16,7 +17,7 @@ namespace BlueWaterProject
|
|||||||
[field: SerializeField] public Image WeatherIcon { get; set; }
|
[field: SerializeField] public Image WeatherIcon { get; set; }
|
||||||
|
|
||||||
[SerializeField] private float updateTime = 1f;
|
[SerializeField] private float updateTime = 1f;
|
||||||
[SerializeField] private CozyController cozyController;
|
[FormerlySerializedAs("cozyController")] [SerializeField] private CozyManager cozyManager;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
@ -29,7 +30,7 @@ namespace BlueWaterProject
|
|||||||
{
|
{
|
||||||
Date.text = CozyWeather.instance.timeModule.currentDay + " Days";
|
Date.text = CozyWeather.instance.timeModule.currentDay + " Days";
|
||||||
Time.text = CozyWeather.instance.timeModule.currentTime.ToString();
|
Time.text = CozyWeather.instance.timeModule.currentTime.ToString();
|
||||||
WeatherIcon.sprite = cozyController.CurrentWeatherInfo.Sprite;
|
WeatherIcon.sprite = cozyManager.CurrentWeatherInfo.Sprite;
|
||||||
|
|
||||||
yield return new WaitForSeconds(updateTime);
|
yield return new WaitForSeconds(updateTime);
|
||||||
}
|
}
|
||||||
|
16574
BlueWater/Assets/05.Prefabs/Cozy Weather Sphere.prefab
Normal file
16574
BlueWater/Assets/05.Prefabs/Cozy Weather Sphere.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: be1d50d0f9a83864698b17f9e155db2d
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user