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 class EncryptedOutput : IOutputStrategy | |
{ | |
public string Output(string input) | |
{ | |
char[] array = input.ToCharArray(); | |
for (int i = 0; i < array.Length; i++) | |
{ | |
int number = (int)array[i]; | |
if (number >= 'a' && number <= 'z') |
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 class OutputContext | |
{ | |
IOutputStrategy outputStrategy; | |
public OutputContext(IOutputStrategy outputStrategy) | |
{ | |
this.outputStrategy = outputStrategy; | |
} | |
public string GetOutput(string input) | |
{ |
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 class OutputStrategyController : MonoBehaviour | |
{ | |
public string input = "This is some arbitrary input string"; | |
void Start() | |
{ | |
OutputContext context = new OutputContext(new CSVOutput(' ')); | |
Debug.Log("This is the CSV output:\n" + context.GetOutput(input)); | |
//Easily change the context! |
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; | |
public class ComponentCache | |
{ | |
public enum LogMessageLevel { all, error, none} | |
LogMessageLevel logMessageLevel = LogMessageLevel.error; | |
private GameObject _gameObject; | |
private List<Component> _components = new List<Component>(); |
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 System.Collections; | |
using System; | |
public class InputDetector : MonoBehaviour | |
{ | |
public enum TestType { joystickButtons, keys, axis, mouse, touch } | |
public TestType testType = TestType.joystickButtons; | |
public bool logMessages = true; |
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; | |
[RequireComponent(typeof(Camera))] | |
public class NaplandCamera : MonoBehaviour { | |
#pragma warning disable 0414 | |
public static float minX; | |
public static float maxX; |
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 UnityEngine; | |
namespace NG | |
{ | |
public static class Vector3Ext | |
{ | |
#region Multilerp | |
// This is not very optimized. There are at least n + 1 and at most 2n Vector3.Distance | |
// calls (where n is the number of waypoints). |
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
LICENSE SYSTEM [2016818 0:55:25] No start/stop license dates set | |
LICENSE SYSTEM [2016818 0:55:25] Next license update check is after 2016-08-07T20:46:52 | |
Built from '5.3/patch-release' branch; Version is '5.3.4p5 (83b1f50dd5b8) revision 8630773'; Using compiler version '160040219' | |
OS: 'Windows 10 (10.0.0) 64bit' Language: 'en' Physical Memory: 16284 MB | |
BatchMode: 0, IsHumanControllingUs: 1, StartBugReporterOnCrash: 1, Is64bit: 1, IsPro: 0 | |
Initialize mono | |
Mono path[0] = 'E:/Unity_5.3.4p5/Editor/Data/Managed' |
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 UnityEditor; | |
public class MakeSpriteTexture : EditorWindow | |
{ | |
[MenuItem("Assets/Create Sprite")] | |
static void Init() | |
{ | |
MakeSpriteTexture window = GetWindow<MakeSpriteTexture>("Create Sprite"); |
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 UnityEditor; | |
using UnityEngine.UI; | |
using TMPro; | |
using TMPro.EditorUtilities; | |
public class UGuiTextToTextMeshPro : Editor | |
{ | |
[MenuItem("GameObject/UI/Convert To Text Mesh Pro", false, 4000)] | |
static void DoIt() |