This file contains hidden or 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
| private string text = "I bet you can't type an A!"; | |
| static void DisableKeys( KeyCode[] keys ) | |
| { | |
| if( !Event.current.isKey ) | |
| { | |
| return; | |
| } |
This file contains hidden or 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 UnityEditor; | |
| using System.Collections; | |
| public class ComponentLister : EditorWindow | |
| { | |
| private Hashtable sets = new Hashtable(); | |
| private Vector2 scrollPosition; |
This file contains hidden or 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 Magnetic : MonoBehaviour | |
| { | |
| public LayerMask m_MagneticLayers; | |
| public Vector3 m_Position; | |
| public float m_Radius; | |
| public float m_Force; |
This file contains hidden or 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
| private IEnumerator DoFadeAlphaIn () | |
| { | |
| while (m_Alpha < 1.0f) | |
| { | |
| m_Alpha += Time.deltaTime; | |
| yield return null; | |
| } | |
| m_Alpha = 1.0f; | |
| } |
This file contains hidden or 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 SelectableObject : MonoBehaviour | |
| { | |
| public Rect m_SelectionWindowRect = new Rect (10.0f, 10.0f, 300.0f, 100.0f); | |
| public void OnMouseDown () | |
| { | |
| SelectionManager.Select (gameObject, !SelectionManager.IsSelected (gameObject)); | |
| } |
This file contains hidden or 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
| do shell script "sudo /usr/local/bin/blueutil off" with administrator privileges | |
| delay 5 | |
| do shell script "sudo /usr/local/bin/blueutil on" with administrator privileges |
This file contains hidden or 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
| #if DEBUG | |
| Debug.Log ("I'm only visible in debug builds!"); | |
| #endif |
This file contains hidden or 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 PlayerController : MovementController | |
| { | |
| public float speed = 5.0f, rotationSpeed = 50.0f; | |
| void Update () |
This file contains hidden or 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.Linq; | |
| using System.Net.Sockets; | |
| using System.Net; | |
| public static IPAddress IP | |
| { | |
| get | |
| { | |
| if (ip == null) |
This file contains hidden or 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
| void AnimateAdditiveAim () | |
| // Optionally using additive animation to visualize look. Alternative is procedural look. | |
| { | |
| if (aimAnimations == null) | |
| { | |
| return; | |
| } | |
| aimAnimations.NormalizedTime = 0.0f; |