This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define _CD_Use_MonoBehaviour_ | |
#define _CD_Use_Singlton_ | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
public class CDManager | |
#if _CD_Use_MonoBehaviour_ | |
: MonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
public class StorageEnergy | |
{ | |
public static float CurrentTime { get { return Time.fixedTime; } } | |
public float Persent { get; private set; } | |
public Action onStart; | |
public Action onFinished; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
//资源管理 | |
public class ResourcesManager | |
{ | |
public static T Load<T>(string folder, string fileName) where T : UnityEngine.Object | |
{ | |
#if UNITY_EDITOR | |
T obj = UnityEditor.AssetDatabase.LoadAssetAtPath<T>(string.Format("Assets/{0}/{1}", folder, fileName)); | |
if (null != obj) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ShowProfile : MonoBehaviour | |
{ | |
public float SampleTime = 0.5f; | |
private float m_lastUpdateTime = 0.0f; | |
private float m_fps = 0.0f; | |
private int m_frame = 0; | |
void Update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ComboCounter | |
{ | |
public static float CurrentTime { get { return Time.fixedTime; } } | |
public System.Action onBegin; | |
public System.Action<int> onIncrease; | |
public System.Action<int> onEnd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define _Debug_Tools | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.IO; | |
public class ImageManager : MonoBehaviour | |
{ | |
public static void Request(string url, System.Action<Texture2D> callback) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
public class EditorTools | |
{ | |
//获取场景内所有对象,无论是否Active | |
//http://wonderm.coding.io/2015/08/31/Unity-Editor-SelectAll/ | |
//感谢 白昼 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class HashTools | |
{ | |
public static byte[] GenMD5(byte[] source) | |
{ | |
MD5 md5 = new MD5CryptoServiceProvider(); | |
return md5.ComputeHash(source); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Ming on 2016/6/12. | |
*/ | |
public class Sphere { | |
private static final float[] Vertices = { | |
0f, 0f, 1.164415f, | |
9.929748E-09f, 0.2271661f, 1.142041f, | |
0.04431792f, 0.2228012f, 1.142041f, | |
0.08693273f, 0.4370403f, 1.075779f, | |
1.94779E-08f, 0.4456024f, 1.075779f, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ICSharpCode.SharpZipLib.Zip; | |
using System.Collections; | |
using UniRx; | |
using UnityEngine; | |
public static class ZipUtil | |
{ | |
public static IEnumerator Create(string name) | |
{ | |
string pakPath = string.Format("{0}/{1}.pak", Application.temporaryCachePath, name); |
OlderNewer