code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
// Copyright (c) 2011 Bob Berkebile (pixelplacment) // Please direct any bugs/comments/suggestions to http://pixelplacement.com // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without r...
zzzstrawhatzzz
trunk/client/Assets/iTweenEditor/iTween.cs
C#
asf20
272,069
using UnityEngine; using System.Collections.Generic; using System.Collections; using System.Linq; public class StartAndStopTween : MonoBehaviour { public GameObject target; void OnGUI() { // if(GUILayout.Button("Start Bounce")) { // iTweenEvent.GetEvent(target, "Bounce").Play(); // } // // if(GUILayo...
zzzstrawhatzzz
trunk/client/Assets/iTweenEditor/Examples/StartAndStopTween.cs
C#
asf20
647
// Copyright (c) 2009-2012 David Koontz // Please direct any bugs/comments/suggestions to david@koontzfamily.org // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restrictio...
zzzstrawhatzzz
trunk/client/Assets/iTweenEditor/iTweenEvent.cs
C#
asf20
22,904
//by Bob Berkebile : Pixelplacement : http://www.pixelplacement.com using UnityEngine; using System.Collections.Generic; public class iTweenPath : MonoBehaviour { public string pathName =""; public Color pathColor = Color.cyan; public List<Vector3> nodes = new List<Vector3>(){Vector3.zero, Vector3.zero}; public i...
zzzstrawhatzzz
trunk/client/Assets/iTweenEditor/iTweenPath.cs
C#
asf20
1,019
using UnityEngine; using System.Collections; public class AnimateSwapTextures : MonoBehaviour { public Texture2D[] textures; public string textureName; public int fps; private int currentFrame; private float currentFrameTime; // Cache public Material material; void Awake() { if (string.I...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/AnimateSwapTextures.cs
C#
asf20
895
using UnityEngine; using System.Collections; /// <summary> /// Using Find and Replace for every script file in the project ( ": GMonoBehaviour" -> ": GMonoBehaviour" /// </summary> public class GMonoBehaviour : /*Exclude from find and replace*/MonoBehaviour { }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/GMonoBehaviour.cs
C#
asf20
275
using UnityEngine; using System.Collections; [AddComponentMenu("Utilities/HUDFPS")] public class HUDFPS : MonoBehaviour { // Attach this to any object to make a frames/second indicator. // // It calculates frames/second over each updateInterval, // so the display does not keep changing wildly. // // I...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/HUDFPS.cs
C#
asf20
2,653
using UnityEngine; using System.Collections; using System.Collections.Generic; [AddComponentMenu("GFramework/Global Data")] public class GlobalData : GMonoBehaviour { private static Dictionary<string, GameObject> cache = new Dictionary<string, GameObject>(); // Use this for initialization void Awake() ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/GlobalData.cs
C#
asf20
595
using UnityEngine; using System.Collections; public class TimedTrailRenderer : MonoBehaviour { public bool emit = true; public float emitTime = 0.00f; public Material material; public float lifeTime = 1.00f; public Color[] colors; public float[] sizes; public float uvLengthScale = 0.01f; publ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/TimedTrailRenderer.cs
C#
asf20
7,510
using UnityEngine; using System.Collections; public class AnimateTextureOffset : MonoBehaviour { public Vector2 speed; // Cache public Material _material { get; private set; } void Awake() { _material = renderer.sharedMaterial; } // Update is called once per frame void Update () { Vector2 ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Behaviours/AnimateTextureOffset.cs
C#
asf20
462
using System.Collections; using System.Text; using System.Net; using System.IO; using System; using System.Threading; namespace Framework.Network { public class XHttp { public string RequestSync(string url, string userAgent, string postData, int timeout, bool keepAlive) { //Header HttpWeb...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Network/XHttp.cs
C#
asf20
3,649
using System; using System.Text; using System.Security.Cryptography; namespace Framework.Network { public class XAes { private System.Text.UTF8Encoding utf8Encoding = null; private RijndaelManaged rijndael = null; public XAes(string key, string iv) { this.utf8Encoding = ne...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Network/XAes.cs
C#
asf20
3,400
//using UnityEngine; using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Reflection; using JsonFx.Json; namespace Framework.Network { /// <summary> /// Request parameters base class /// </summary> public class Req...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Network/MessageParams.cs
C#
asf20
1,486
using UnityEngine; using System; using System.Collections; public enum SGPlayerMode { None = -1, Single = 0, Multi = 1, Online = 2 } public class SGSystem : SingletonMono<SGSystem> { public System.Random randomGenerator = new System.Random((int)DateTime.Now.Ticks & 0x0000FFFF); private bo...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/System/SGSystem.cs
C#
asf20
1,109
using UnityEngine; using System.Collections; public class StatisticDefine { // Funnels public const string REACH_LEVEL = "Reach Level"; // Paying Users public const string PAY_1ST_TIME = "Pay 1ST Time"; // Payment public const string PAY = "Pay"; }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/System/StatisticDefine.cs
C#
asf20
263
using System.Collections; using System.Collections.Generic; using UnityEngine; /** * Interpolation utility functions: easing, bezier, and catmull-rom. * Consider using Unity's Animation curve editor and AnimationCurve class * before scripting the desired behaviour using this utility. * * Interpolation fu...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/Interpolate.cs
C#
asf20
25,755
using UnityEngine; /// <summary> /// Screen positions for use with the ScreenPlacement transform and gameObject extension for the 9 positions around the screen edge. /// </summary> public enum ScreenPosition {UpperLeft, UpperMiddle, UpperRight, Left, Middle, Right, LowerLeft, LowerMiddle, LowerRight}; public static c...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ScreenPlacementExtension.cs
C#
asf20
6,632
using UnityEngine; using System.Collections; using GFramework; using System; public class SystemHelper { private static string _deviceUniqueID; public static string deviceUniqueID { get { try { if (_deviceUniqueID == null) compute...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/SystemHelper.cs
C#
asf20
693
using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace GFramework { public class Layout { public class Scroll : IDisposable { bool _disposed = false; pr...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/LayoutHelper.cs
C#
asf20
6,647
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using System.Reflection; namespace GFramework { public interface IConfigDataTable { /// <summary> /// Get name /// </summary> string GetName(); /// <summary>...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ConfigDataTable.cs
C#
asf20
8,048
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Xml; using System.Xml.Serialization; using System.Xml.XPath; using UnityEngine; namespace GFramework { public class XmlHelper { public static Quaternion ToQuaternion(XmlNode node) { return n...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/XmlHelper.cs
C#
asf20
5,146
using UnityEngine; using System.Collections; using System.Collections.Generic; using System; using System.Linq; public class LeakCounter { public int allCounters; public Dictionary<string, int> objectInstances = new Dictionary<string, int>(); public List<KeyValuePair<string, int>> sortedObjectInstances; ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/DetectLeaks.cs
C#
asf20
3,991
using UnityEngine; using System; namespace GFramework { struct VertexData { // Pointers to vertex data public Vector3[] positions; public Vector3[] normals; public BoneWeight[] boneWeights; public Color[] colors; public Vector2[] uv; public Vector2[] uv1; public Vector2[] uv2; publi...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/MeshBuilder.cs
C#
asf20
20,743
using UnityEngine; using System.Collections; public class UserProfile : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/UserProfile.cs
C#
asf20
207
using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using UnityEngine; namespace GFramework { /// <summary> /// /// </summary> ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ConsoleCommands.cs
C#
asf20
17,141
//#define LOGIC_TEST // comment for production, uncomment for test sample using System; using System.Collections.Generic; // (c) Gregory Adam 2009 //http://www.brpreiss.com/books/opus4/html/page557.html /* and * An Introduction to data structures with applications * Jean-Paul Tremblay - Paul G. Sore...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/TopologicalSort.cs
C#
asf20
7,649
using System; using UnityEngine; namespace GFramework { public class SinCosTable { private const int TABLE_SIZE = 3600; private const float TABLE_CONSTANT = TABLE_SIZE / (2 * Mathf.PI); private static float[] sinTable; private static float[] cosTable; static SinCosTable() { Prebuild(...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/MathfEX.cs
C#
asf20
16,220
using UnityEngine; using System.Collections; public class GameFPSCounter : MonoBehaviour { public float frequency = 0.5f; public int fps; // Use this for initialization void Start () { StartCoroutine(CountFPS()); } private IEnumerator CountFPS() { for (; ; ) { int lastFrameCount = Time.f...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/GameFPSCounter.cs
C#
asf20
606
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace GFramework { /// <summary> /// Generic object manager container /// Support superior finding on object key and flexible object type-based query /// </summary> /// <ty...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ObjectManager.cs
C#
asf20
10,207
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace GFramework { public class Point { public float x; public float y; } public static class ConvexHull { public static List<Point> FindConve...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ConvexHull.cs
C#
asf20
3,069
using System; using System.Reflection; using UnityEngine; namespace GFramework { /// <summary> /// Field and Property Info in one single class /// </summary> public class FieldPropertyInfo { #region Fields private MemberInfo memberInfo; #endregion #region Constructors private Fi...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/FieldPropertyInfo.cs
C#
asf20
3,574
using UnityEngine; using System; using System.Collections.Generic; public abstract class SystemModule : GMonoBehaviour { /// <summary> /// Get dependencies /// </summary> /// <returns></returns> public abstract System.Type[] GetDependencies(); /// <summary> /// Initialize the module /// </summa...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/SystemModule.cs
C#
asf20
1,029
using UnityEngine; using System.Linq; using System.Collections; /// <summary> /// Renderer extension. /// </summary> public static class RendererExtension { public static Material GetManagedMaterial(this Renderer renderer) { ManagedMaterial managedMaterial = renderer.GetComponent<ManagedMate...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ManagedMaterial.cs
C#
asf20
4,329
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using X11; namespace X11 { public static partial class Extensions { /// <summary> /// Get property generic /// </summary> public static TType GetDataAs<TType>...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/XExtensions.cs
C#
asf20
2,999
using UnityEngine; using System.Collections; using System; using System.Linq; using System.Collections.Generic; [ExecuteInEditMode] public class SkinnedMeshesCombiner : MonoBehaviour { /// Usually rendering with triangle strips is faster. /// However when combining objects with very low triangle counts, it...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/SkinnedMeshesCombiner.cs
C#
asf20
6,134
using UnityEngine; using System.Collections; using System; public class RandomHelper { public static readonly System.Random rand = new System.Random(); /// <summary> /// Roulette selector algorithm /// </summary> public static TType SelectRoulette<TType>(TType[] group, Func<TType, float> getFitness) { ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/RandomHelper.cs
C#
asf20
1,187
using System; public class FileSizeFormatProvider : IFormatProvider, ICustomFormatter { public object GetFormat(Type formatType) { if (formatType == typeof(ICustomFormatter)) return this; return null; } private const string fileSizeFormat = "fs"; private const Decimal On...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/FileSizeFormatProvider.cs
C#
asf20
2,103
/* * Copyright (c) 2012 Calvin Rien * * Based on the JSON parser by Patrick van Bergen * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html * * Simplified it so that it doesn't throw exceptions * and can be used in Unity iPhone with maximum code stripping. * * P...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/MiniJSON.cs
C#
asf20
18,160
using System; using System.Collections; using System.Reflection; using System.Text; namespace GFramework { public static class ObjectDumper { public static string Dump (this object o) { StringBuilder sb = new StringBuilder(); Dump(sb, o, 0, new ArrayList()); return sb.ToString(); } ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ObjectDumper.cs
C#
asf20
4,634
using System; using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Runtime.InteropServices; using UnityEngine; namespace GFramework { public class ConsoleTypeConversion { private static Dictionary<System.Type, MethodInfo> methods = new Diction...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ConsoleTypeConversion.cs
C#
asf20
7,680
using UnityEngine; using System; namespace GFramework { /// <summary> /// Color class /// </summary> [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)] public struct GColor { // access by colorref [System.Runtime.InteropServices.FieldOffset(0)] p...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/Color.cs
C#
asf20
12,861
using UnityEngine; using System.Collections; public class UserProfileManager : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/UserProfileManager.cs
C#
asf20
214
using System.Security.Cryptography; using System; public class Crc32 : HashAlgorithm { public const UInt32 DefaultPolynomial = 0xedb88320; public const UInt32 DefaultSeed = 0xffffffff; private UInt32 hash; private UInt32 seed; private UInt32[] table; private static UInt32[] defaultTable; public C...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/CRC32.cs
C#
asf20
2,490
using System.Collections; using System; using UnityEngine; /* Perlin noise use example: Perlin perlin = new Perlin(); var value : float = perlin.Noise(2); var value : float = perlin.Noise(2, 3, ); var value : float = perlin.Noise(2, 3, 4); SmoothRandom use example: var p = SmoothRandom.GetVector3(3); */ public c...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/Perlin.cs
C#
asf20
14,232
using UnityEngine; using System; /// <summary> /// Singleton base class /// </summary> public class Singleton<T> where T : class, new() { private static readonly T singleton = new T(); public static T instance { get { return singleton; } } } /// <summary> /// Singleton for mono beha...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/Singleton.cs
C#
asf20
1,734
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using X11; using GFramework; namespace X11 { public static partial class Extensions { #region Unity type helpers /// <summary> /// Check vector equals /// </s...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/XUnityExtensions.cs
C#
asf20
2,456
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GFramework { /// <summary> /// Update scheduler to shedule a specific job /// </summary> public class JobScheduler { /// <summary> /// A single job /// </summary> class Job { // Interval ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/JobScheduler.cs
C#
asf20
3,401
using UnityEngine; using System.Collections; public class EffectRepawner : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/EffectRepawner.cs
C#
asf20
210
using UnityEngine; using System.Collections; using System; using System.Collections.Generic; using GFramework; [Serializable] public class FastColliderNode { public Transform transform; public string name; public Vector3 firstPt; public Vector3 lastPt; public float radius; public void Init(strin...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/FastCollider.cs
C#
asf20
3,354
using UnityEngine; using System; using System.Collections; using System.Collections.Generic; namespace GFramework { /// <summary> /// Event handler response value /// </summary> public enum EventResponse { Block, PassThrough, } /// <summary> /// Base class for event data /// </summary>...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/EventDispatcher.cs
C#
asf20
2,704
/// <summary> /// iTweenHinting (iT) - An iTween(http://itween.pixelplacement.com) helper class that store all parameters of all tweening function to allow for code hinting/discovery. /// Tested compatibility with iTween Version: 2.0.37 /// </summary> // // released under MIT License // http://www.opensourc...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/iTweenHinting.cs
C#
asf20
111,532
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; public class Encryption { public static System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create(); public static RijndaelManaged GetRijndaelManaged(String secret...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/Encryption.cs
C#
asf20
4,038
//#define USE_SharpZipLib /* * * * * * A simple JSON Parser / builder * ------------------------------ * * It mainly has been written as a simple JSON parser. It can build a JSON string * from the node-tree, or generate a node tree from any valid JSON string. * * If you want to use compression when s...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/SimpleJSON.cs
C#
asf20
24,690
using System; using System.Collections.Generic; using System.Linq; namespace GFramework { /// <summary> /// /// </summary> public static class IDictionaryExtensions { /// <summary> /// Get all relate keys by value /// </summary> public static bool TryGetKeysByValue<TKey, TValue>(this IDict...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/ReadOnlyDictionary.cs
C#
asf20
1,891
#region Copyright // ---------------------------------------------------------------------------- // // Modifications made by: Alex Kring (c) 2011, for SimplePath // // OpenSteerDotNet - pure .net port // Port by Simon Oliver - http://www.handcircus.com // // OpenSteer -- Steering Behaviors for Autonomous Chara...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/PolylinePathway.cs
C#
asf20
7,331
using UnityEngine; using System.Collections; using System; using System.Collections.Generic; public class SkinnedMeshCombinerUtility { /// <summary> /// /// </summary> public enum CombineMode { // Medium speed, largest number of bones, accurate for all type of skinned mesh // Duplicate bone/bindpos...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/SkinnedMeshCombinerUtility.cs
C#
asf20
14,905
 /// <summary> /// Object layer definations /// </summary> public class GlobalLayers { /// <summary>UI layer</summary> public const int UI = 8; public const int UIMask = 1 << UI; /// <summary>Player layers</summary> public const int Players = 9; public const int PlayersMask = 1 << Players; ...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/GlobalLayers.cs
C#
asf20
602
using System; using System.Collections.Generic; namespace GFramework { /// <summary> /// Multimap /// </summary> /// <typeparam name="KeyType"></typeparam> /// <typeparam name="ValueType"></typeparam> public class SortedMultiMap<TKey, TValue> : IEnumerable<KeyValuePair<TKey, List<TValue>>> { Sort...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/MultiMap.cs
C#
asf20
3,503
using UnityEngine; using System.Collections; public class PickUtil { public static bool PickObject(Camera camera, Vector2 screenPos, int layers, out RaycastHit hit) { Ray ray = camera.ScreenPointToRay(new Vector3(screenPos.x, screenPos.y, 0)); return Physics.Raycast(ray, out hit, layers); } public st...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/PickUtil.cs
C#
asf20
532
using UnityEngine; using System; using System.Linq; using System.Collections.Generic; using GFramework; [Serializable] public class AlternativeMaterial { public string name; public Material[] materials; } [AddComponentMenu("GFramework/Material Changer")] public class MaterialChanger : MonoBehaviou...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/MaterialChanger.cs
C#
asf20
3,799
using System; using System.Collections; using System.Collections.Generic; namespace GFramework { public class OrderedListItem<TKey> where TKey : IComparable<TKey> { public TKey key; public OrderedListItem() { } public OrderedListItem(TKey key) { this.key = key; } } public c...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/OrderedList.cs
C#
asf20
1,662
using System; using System.Text; using System.Globalization; namespace GFramework { public class StringHelper { /// <summary> /// To convert a byte Array of Unicode values (UTF-8 encoded) to a complete string. /// </summary> /// <param name="characters">Unicode byte Array to be converted to strin...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Utilities/StringHelper.cs
C#
asf20
1,007
using UnityEngine; using System.Collections; using System; [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public class SoundClipAttribute : Attribute { public string name { get; set; } public SoundClipAttribute(string name) { this.name = name; } }
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Audio/SoundClipAttribute.cs
C#
asf20
301
using UnityEngine; using System.Collections; using System; using System.Collections.Generic; [Serializable] public class SoundName { public string name; public AudioClip clip; } [ExecuteInEditMode] [RequireComponent(typeof(AudioSource))] public class SoundableObject : MonoBehaviour { public List<SoundN...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Audio/SoundableObject.cs
C#
asf20
2,534
using UnityEngine; using System.Collections; namespace Framework { //======================================================== // class BaseSingleton //======================================================== // - for making singleton object // - usage // + declare class(derived ) // public clas...
zzzstrawhatzzz
trunk/client/Assets/Suga Framework/Base/BaseSingleton.cs
C#
asf20
765
using UnityEngine; using System.Collections; public class Bars : MonoBehaviour { private float lastCutOffValue = 0f; public float cutOffValue = 0; private UITexture uiTexture = null; private Material barMaterial = null; // Use this for initialization IEnumerator Start () { uiTexture = GetComponent<UITexture>(...
zzzstrawhatzzz
trunk/client/Assets/RPG Theme NGUI Skin/Script/Bars.cs
C#
asf20
954
/* * MenuDemo.cs * This script is for demonstration purposes only! */ using UnityEngine; using System.Collections; public class MenuDemo : MonoBehaviour { //windows GameObject inventoryWindow, questWindow, skillWindow, settingsWindow; //tooltips GameObject skillTooltip, itemTooltip, ...
zzzstrawhatzzz
trunk/client/Assets/RPG Theme NGUI Skin/Script/MenuDemo.cs
C#
asf20
4,597
Shader "HealthMagic" { Properties { _Color("Bar Color", Color) = (1,1,1,1) _MainTex("Main Texture", 2D) = "black" {} _Effect("Distortion Texture", 2D) = "black" {} _Mask("Cutoff Mask", 2D) = "black" {} _Distortion("Distortion Power", Float) = 0 _Offset("Distortion Offset", Float) = 0 _Speed("Scroll Speed", Float) = ...
zzzstrawhatzzz
trunk/client/Assets/RPG Theme NGUI Skin/Shader/HealthMagic.shader
ShaderLab
asf20
3,903
using UnityEngine; using System.Collections; /// <summary> /// This tracks input gestures for a mouse device /// </summary> public class MouseGestures : FingerGestures { // Number of mouse buttons to track public int maxMouseButtons = 3; protected override void Start() { base.Star...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/MouseGestures.cs
C#
asf20
1,351
using UnityEngine; using System.Collections; /// <summary> /// Input.Axis-based Pinch gesture replacement for mouse-device /// Warning: it's a bit of a hack caused due to design limitations :( /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Mouse Pinch" )] public class MousePinchGestureR...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/MousePinchGestureRecognizer.cs
C#
asf20
1,980
using UnityEngine; using System.Collections; /// <summary> /// The finger motion detector component is not an actual gesture but is responsible for tracking the motion (or stillness) of a specific finger /// </summary> public class FingerMotionDetector : FGComponent { /// <summary> /// Event fired whe...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/FingerMotionDetector.cs
C#
asf20
8,020
using UnityEngine; using System.Collections; /// <summary> /// Swipe gesture: quick drag/drop motion & release in a cardinal direction (e.g. a page flip with the finger) /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Swipe" )] public class SwipeGestureRecognizer : AveragedGestureRecognize...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/SwipeGestureRecognizer.cs
C#
asf20
4,588
using UnityEngine; using System.Collections; /// <summary> /// Rotation gesture, also known as twist gesture /// This gesture is performed by moving two fingers around a point of reference in opposite directions /// /// NOTE: it is recommanded to set ResetMode to GestureResetMode.NextFrame for this gesture /...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/RotationGestureRecognizer.cs
C#
asf20
5,956
using UnityEngine; using System.Collections; /// <summary> /// Long-Press gesture: detects when the finger is held down without moving, for a specific duration /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Long Press" )] public class LongPressGestureRecognizer : AveragedGestureRecognizer...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/LongPressGestureRecognizer.cs
C#
asf20
1,977
using UnityEngine; using System.Collections; /// <summary> /// Tap gesture: single or multiple consecutive press and release gestures at the same location /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Tap" )] public class TapGestureRecognizer : AveragedGestureRecognizer { /// <summ...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/TapGestureRecognizer.cs
C#
asf20
5,597
using UnityEngine; using System.Collections; /// <summary> /// Pinch gesture: two fingers moving closer or further away from each other /// /// NOTE: it is recommanded to set ResetMode to GestureResetMode.NextFrame for this gesture /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Pinch" )...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/PinchGestureRecognizer.cs
C#
asf20
5,866
using UnityEngine; using System.Collections; /// <summary> /// Drag gesture: a full finger press > move > release sequence /// </summary> [AddComponentMenu( "FingerGestures/Gesture Recognizers/Drag" )] public class DragGestureRecognizer : AveragedGestureRecognizer { /// <summary> /// Event fired when...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/DragGestureRecognizer.cs
C#
asf20
3,164
using UnityEngine; using System.Collections; /// <summary> /// Base class for any FingerGestures component /// Its main task is to fire off OnUpdate() after the FingerGestures.Fingers have been updated during this frame. /// </summary> public abstract class FGComponent : MonoBehaviour { public delegate vo...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/Base/FGComponent.cs
C#
asf20
1,247
using UnityEngine; using System.Collections; /// <summary> /// The base class for all gesture recognizers /// </summary> public abstract class GestureRecognizer : FGComponent { /// <summary> /// Possible gesture states /// </summary> public enum GestureState { /// <summary> ...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/Base/GestureRecognizer.cs
C#
asf20
9,060
using UnityEngine; using System.Collections; /// <summary> /// Base class for multi-finger gestures that require individual access to each finger position (as opposed to averaged position) /// </summary> public abstract class MultiFingerGestureRecognizer : GestureRecognizer { Vector2[] startPos; prote...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/Base/MultiFingerGestureRecognizer.cs
C#
asf20
1,505
using UnityEngine; using System.Collections; /// <summary> /// Base class used by most common gestures that can be performed with /// and arbitrary number of fingers, such as drag, tap, swipe... /// /// The position of the fingers are averaged and stored in the /// StartPosition and/or Position fields /// <...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/Components/Base/AveragedGestureRecognizer.cs
C#
asf20
1,131
using UnityEngine; using System.Collections; public class FingerGesturesPrefabs : MonoBehaviour { public FingerMotionDetector fingerMotion; public DragGestureRecognizer fingerDrag; public TapGestureRecognizer fingerTap; public SwipeGestureRecognizer fingerSwipe; public LongPressGestureReco...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/FingerGesturesPrefabs.cs
C#
asf20
818
using UnityEngine; using System.Collections; /// <summary> /// This tracks input gestures for a touch-screen device (mobiles) /// </summary> public class TouchScreenGestures : FingerGestures { /// <summary> /// Maximum number of simultaneous fingers to track /// </summary> public int maxFing...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/TouchScreenGestures.cs
C#
asf20
2,503
using UnityEngine; using System.Collections; /// <summary> /// This class is used to create and initialise the proper FigureGesture implementation based on the current platform the application is being run on /// </summary> public class FingerGesturesInitializer : MonoBehaviour { public FingerGestures editor...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/FingerGesturesInitializer.cs
C#
asf20
1,176
// FingerGestures v2.2 (November 15th 2011) // The FingerGestures library is copyright (c) of William Ravaine // Please send feedback or bug reports to spk@fatalfrog.com // More FingerGestures information at http://www.fatalfrog.com/?page_id=140 // Visit my website @ http://www.fatalfrog.com using UnityEngine; ...
zzzstrawhatzzz
trunk/client/Assets/Plugins/FingerGestures/FingerGestures.cs
C#
asf20
64,097
using UnityEngine; using System.Collections; public class SoundPlayerScript : MonoBehaviour { public void PlaySound(AudioClip inClip ) { //DontDestroyOnLoad(gameObject); audio.PlayOneShot(inClip); } public void PlaySoundLoop(AudioClip inClip, float timeDelay = 0) { audio.loop = true; audio....
zzzstrawhatzzz
trunk/client/Assets/Audio/Scripts/SoundPlayerScript.cs
C#
asf20
845
public enum eSoundName { bell, Cancel, chatty, Click, drump, fishing_fail, fishing_start, fishing_start2, fishing_succes, fishing_wait_minigame, open, piyo, piyopiyo, shower, sleep, }; public enum MusicName { Beach, EventArea, fever, FishingMiniGame, MyRoom, Opening, River, SelectMap, Shop, };...
zzzstrawhatzzz
trunk/client/Assets/Audio/Scripts/DefineAudio.cs
C#
asf20
321
using UnityEngine; using System.Collections; public class MusicPlayerScript : MonoBehaviour { //======================================== // //======================================== void Awake() { //DontDestroyOnLoad(gameObject); audio.loop = true; } //======================================== ...
zzzstrawhatzzz
trunk/client/Assets/Audio/Scripts/MusicPlayerScript.cs
C#
asf20
1,089
using UnityEngine; using System.IO; using System.Collections; using System.Collections.Generic; //using SFCLIB; public class AvAudioManager : SingletonMono<AvAudioManager> { const string soundPrefab = "Prefabs/Audio/SoundPlayer"; const string musicPrefab = "Prefabs/Audio/MusicPlayer"; private ...
zzzstrawhatzzz
trunk/client/Assets/Audio/Scripts/AvAudioManager.cs
C#
asf20
10,435
using UnityEngine; using System.Collections; using UnityEditor; using System.IO; using System.Collections.Generic; public class AudioToolEditor : ScriptableObject { [MenuItem("Tools/Audio/CreateAudioEnum")] static void CreateTool() { string outStr = "public enum eSoundName {\n"; stri...
zzzstrawhatzzz
trunk/client/Assets/Audio/Editor/AudioToolEditor.cs
C#
asf20
4,149
using UnityEngine; using System.Collections; public delegate void ButtonClick(); public enum DialogName { None, MessageBox }
zzzstrawhatzzz
trunk/client/Assets/UIManager/DefineUI.cs
C#
asf20
144
using UnityEngine; using System.Collections; public class GUIBaseDialogHandler : MonoBehaviour { [HideInInspector] public UIPanel uiPanel; public void Initial() { Camera uiCam = GameObject.FindGameObjectWithTag("UICamera").camera; UIAnchor[] anchors = gameObject.GetComponentsInChildren<UIA...
zzzstrawhatzzz
trunk/client/Assets/UIManager/GUIBaseDialogHandler.cs
C#
asf20
850
using UnityEngine; using System.Collections; using System.Collections.Generic; public class AvUIManager : SingletonMono<AvUIManager> { private List<GUIDialogBase> listDialogs = null; public GameObject blackBorder; public GameObject loading; public Camera uiCamera; private int screenWidth=0; ...
zzzstrawhatzzz
trunk/client/Assets/UIManager/AvUIManager.cs
C#
asf20
5,970
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the object's alpha. /// </summary> [AddComponentMenu("NGUI/Tween/Tween Alpha")] public class...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenAlpha.cs
C#
asf20
1,639
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the camera's field of view. /// </summary> [RequireComponent(typeof(Camera))] [AddComponentM...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenFOV.cs
C#
asf20
1,749
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the object's position. /// </summary> [AddComponentMenu("NGUI/Tween/Tween Position")] public...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenPosition.cs
C#
asf20
2,176
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Spring-like motion -- the farther away the object is from the tar...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/SpringPosition.cs
C#
asf20
3,490
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the widget's size. /// </summary> [RequireComponent(typeof(UIWidget))] [AddComponentMenu("NG...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenWidth.cs
C#
asf20
2,063
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the widget's size. /// </summary> [RequireComponent(typeof(UIWidget))] [AddComponentMenu("NG...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenHeight.cs
C#
asf20
2,074
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Tween the audio source's volume. /// </summary> [RequireComponent(typeof(AudioSource))] [AddCompon...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Tweening/TweenVolume.cs
C#
asf20
1,962