powerfun-unity/Assets/Scripts/PFConstants.cs

110 lines
3.1 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using UnityEngine;
public static class PFConstants
{
/// <summary>
/// 课程训练保存在本地的路径
/// </summary>
public static string MapWorkoutRecordFolder
{
get
{
if(!Directory.Exists(Application.persistentDataPath + "/MapWorkoutRecords/")){
Directory.CreateDirectory(Application.persistentDataPath + "/MapWorkoutRecords/");
}
return Application.persistentDataPath + "/MapWorkoutRecords/";
}
}
public static string MapWorkoutRecordTempFolder
{
get
{
if (!Directory.Exists(Application.persistentDataPath + "/MapWorkoutTempRecords/"))
{
Directory.CreateDirectory(Application.persistentDataPath + "/MapWorkoutTempRecords/");
}
return Application.persistentDataPath + "/MapWorkoutTempRecords/";
}
}
/// <summary>
/// 设备连接缓存在本地的路径
/// </summary>
public static string DeviceCacheFolder
{
get
{
return Application.persistentDataPath;
}
}
2022-03-04 16:12:15 +08:00
public static string VideoFolder
{
get
{
string path = string.Empty;
#if UNITY_EDITOR
2023-04-14 15:51:28 +08:00
path = Application.dataPath + @"/Test/Video";
#else
path = Application.streamingAssetsPath + @"/Video";
#endif
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
return path;
2022-03-04 16:12:15 +08:00
}
}
2022-12-05 18:29:49 +08:00
public static string ARFolder
{
get
{
string path = string.Empty;
#if UNITY_EDITOR
2023-04-14 15:51:28 +08:00
path = Application.dataPath + @"/Test/AR";
#else
path = Application.streamingAssetsPath + @"/AR";
#endif
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
return path;
2022-12-05 18:29:49 +08:00
}
}
public static string LogFolder
{
get
{
if (!Directory.Exists(Application.persistentDataPath + "/Logs/"))
{
Directory.CreateDirectory(Application.persistentDataPath + "/Logs/");
}
return Application.persistentDataPath + "/Logs/";
}
}
2022-03-30 18:41:06 +08:00
public static Color Green => new Color(0.1529412f, 0.8901961f, 0.3882353f, 0.6f);
public static Color Yellow => new Color(0.8901961f, 0.8313726f, 0.1529412f, 0.6f);
public static Color Orange => new Color(0.8901961f, 0.5686275f, 0.1529412f, 0.6f);
public static Color Red => new Color(0.8901961f, 0.2313726f, 0.1529412f, 0.6f);
2022-04-24 18:53:29 +08:00
public static Color Pink => new Color(0.9764706f, 0.1882353f, 0.5254902f, 1f);
public static Color grey => new Color(0.3607843f, 0.3607843f, 0.4313726f, 1f);
2022-05-10 19:24:07 +08:00
public static Color Dark => new Color(0.1372549f, 0.1372549f, 0.1764706f, 1f);//23232D
public static Color LightGrey => new Color(0.3607843f, 0.3607843f, 0.4313726f, 1f); // 5C5C6E
2022-03-30 18:41:06 +08:00
}