code fixes after packages removed
This commit is contained in:
parent
3d85213ade
commit
a9fb1864a5
|
|
@ -1,11 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public abstract class Resource
|
public abstract class Resource
|
||||||
{
|
{
|
||||||
[Inspectable]
|
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
public abstract string SourceLabel { get; }
|
public abstract string SourceLabel { get; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[RequireComponent(typeof(ResourceSource))]
|
[RequireComponent(typeof(ResourceSource))]
|
||||||
|
|
@ -29,7 +28,7 @@ public class ResourceGenerator : MonoBehaviour
|
||||||
// PlayerPrefs.Save();
|
// PlayerPrefs.Save();
|
||||||
|
|
||||||
lastTime = long.Parse(
|
lastTime = long.Parse(
|
||||||
PlayerPrefs.GetString(GetLastTimePrefName(), GetCurrentTime().ToSafeString())
|
PlayerPrefs.GetString(GetLastTimePrefName(), GetCurrentTime().ToString())
|
||||||
);
|
);
|
||||||
|
|
||||||
GenerateToNow(false);
|
GenerateToNow(false);
|
||||||
|
|
@ -54,7 +53,7 @@ public class ResourceGenerator : MonoBehaviour
|
||||||
{
|
{
|
||||||
GenerateToNow(true);
|
GenerateToNow(true);
|
||||||
|
|
||||||
PlayerPrefs.SetString(GetLastTimePrefName(), lastTime.ToSafeString());
|
PlayerPrefs.SetString(GetLastTimePrefName(), lastTime.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GenerateToNow(bool online)
|
private void GenerateToNow(bool online)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class ResourceSource : MonoBehaviour
|
public class ResourceSource : MonoBehaviour
|
||||||
{
|
{
|
||||||
[field: SerializeField]
|
|
||||||
public string Label { get; private set; }
|
|
||||||
|
|
||||||
[SerializeReference]
|
[SerializeReference]
|
||||||
public Resource Resource;
|
public Resource Resource;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue