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 TouchScript; | |
using UnityEngine.EventSystems; | |
using System.Reflection; | |
public class TouchFilter : MonoBehaviour | |
{ | |
void OnEnable() | |
{ | |
TouchManager.Instance.TouchesBegan += touchEventOccured; |
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.Generic; | |
using System.Text; | |
using NUnit.Framework; | |
using System; | |
public static class PrettyPrintExtensions | |
{ | |
public static string PrettyPrint(this Mesh m) | |
{ |
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
public static GameObject FindRecursive(this GameObject o, string target_name) | |
{ | |
if(o.name == target_name) | |
return o; | |
int numChildren = o.transform.childCount; | |
for (int i = 0; i < numChildren; ++i) | |
{ | |
GameObject tRet = o.transform.GetChild(i).gameObject.FindRecursive(target_name); | |
if(tRet != null) |
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; | |
// LINK: http://docs.unity3d.com/Manual/SL-SubshaderTags.html | |
public enum RenderOrderType { None = 0, Background = 1000, Geometry = 2000, PhoenixGround = 2010, PhoenixGroundShadow = 2020, | |
PhoenixEnvironProp = 2030, AlphaTest = 2450, Transparent = 3000, Overlay = 4000 } | |
public class RenderOrder : MonoBehaviour | |
{ | |
public int Order; | |
Material material; |
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
Shader "Custom/UnlitTransparentReticle" | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {} | |
_StencilComp ("Stencil Comparison", Float) = 8 | |
_Stencil ("Stencil ID", Float) = 0 | |
_StencilOp ("Stencil Operation", Float) = 0 | |
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |
_StencilReadMask ("Stencil Read Mask", Float) = 255 |
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 UnityEngine.UI; | |
using UnityEngine.EventSystems; | |
using System.Collections.Generic; | |
using NUnit.Framework; | |
using Object = UnityEngine.Object; | |
// LINK: Original code for solution: http://goo.gl/cAlqjS (see Gibbonator's solution) | |
// LINK: Extend editor so we can set sorting layers on andything with a mesh renderer: http://goo.gl/VehK0j | |
public enum ReticleTargetState { None = 0, UGUIFlat, UGUICurved, World } |
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; | |
// interface and base state class | |
////////////////// | |
public interface IBaseState | |
{ | |
void Enter(object o); | |
void Exit(object o); | |
} |
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 UnityEngine.UI; | |
using UnityEngine.EventSystems; | |
using System.Collections; | |
using NUnit.Framework; | |
public class TurnListTap : MonoBehaviour, IPointerClickHandler | |
{ | |
public Transform Target; | |
bool open; |
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.Collections.Generic; | |
public class UnitSight : MonoBehaviour | |
{ | |
public Collider[] overlapCollider; | |
List<Unit> _opponentObservers; | |
BoxCollider _bc; |
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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using UnityEngine.Assertions; | |
using System.Collections.Generic; | |
public class Eye : MonoBehaviour | |
{ | |
// public for debugging |
OlderNewer