Skip to content

Instantly share code, notes, and snippets.

View sunny352's full-sized avatar

MingSailor sunny352

View GitHub Profile
@sunny352
sunny352 / ResourcesManager.cs
Created August 12, 2015 02:29
简单的资源加载功能
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)
{
@sunny352
sunny352 / StorageEnergy.cs
Created August 12, 2015 02:29
蓄力功能计时器
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;
@sunny352
sunny352 / CDManager.cs
Created August 12, 2015 02:28
CD功能管理
//#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