void OnDestroy() { if (instance == this) { instance = null; } }
void Awake() { if (instance == null) { instance = this; } }
public QRCodeDataBlockReader(int[] blocks, int version, int numErrorCorrectionCode) { this.blockPointer = 0; this.bitPointer = 7; this.dataLength = 0; this.blocks = blocks; this.numErrorCorrectionCode = numErrorCorrectionCode; if (version <= 9) { this.dataLengthMode = 0; } else { if (version >= 10 && version <= 26) { this.dataLengthMode = 1; } else { if (version >= 27 && version <= 40) { this.dataLengthMode = 2; } } } this.canvas = QRCodeDecoder.Canvas; }
// Functions for debugging public string TEMP_PrintOutNotes() { var noteString = ""; if (columnList != null) { foreach (var c in columnList) { noteString += c.GetComponent <NoteColumn>()._currenetNoteType; noteString += ','; } } DebugCanvas._PrintText(noteString); return(noteString); }
public QRCodeDataBlockReader(int[] blocks, int version, int numErrorCorrectionCode) { blockPointer = 0; bitPointer = 7; dataLength = 0; this.blocks = blocks; this.numErrorCorrectionCode = numErrorCorrectionCode; if (version <= 9) dataLengthMode = 0; else if (version >= 10 && version <= 26) dataLengthMode = 1; else if (version >= 27 && version <= 40) dataLengthMode = 2; canvas = QRCodeDecoder.Canvas; }
public QRCodeDataBlockReader(int[] blocks, int version, int numErrorCorrectionCode) { this.blocks = blocks; this.numErrorCorrectionCode = numErrorCorrectionCode; if (version <= 9) { this.dataLengthMode = 0; } else if ((version >= 10) && (version <= 0x1a)) { this.dataLengthMode = 1; } else if ((version >= 0x1b) && (version <= 40)) { this.dataLengthMode = 2; } this.canvas = QRCodeDecoder.Canvas; }
void Debug() { GameObject debugScreen = GameObject.Find("DebugScreen"); if (debugScreen) { DebugCanvas canvas = debugScreen.GetComponent <DebugCanvas>(); canvas.Show(0, string.Format("Grounded: {0}", grounded ? "Yes" : "No")); canvas.Show(1, string.Format("Crouched: {0}", crouched ? "Yes" : "No")); canvas.Show(2, string.Format("Health: {0}", healthController.CurrentHealth)); canvas.Show(3, string.Format("Energy: {0}", energyController.CurrentEnergy)); canvas.Show(4, string.Format("Tempo: {0}", Time.time.ToString())); canvas.Show(5, string.Format("Grid Area: {0}", gridArea ? "Yes" : "No")); canvas.Show(6, string.Format("Grabed: {0}", grabed ? "Yes" : "No")); canvas.Show(7, string.Format("Air Jump: {0}", airJump ? "Yes" : "No")); } }
private void CalculateMoveCost() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, 100f)) { NavMesh.CalculatePath(m_controlledUnit.transform.position, hit.point, NavMesh.AllAreas, path); } float pathLength = 0; for (int i = 1; i < path.corners.Length; i++) { pathLength += (path.corners[i - 1] - path.corners[i]).magnitude; //Debug.DrawLine(path.corners[i - 1], path.corners[i], Color.cyan); } DebugCanvas.Display(((int)pathLength).ToString()); }
static FinderPattern() { FinderPattern.VersionInfoBit = new int[] { 31892, 34236, 39577, 42195, 48118, 51042, 55367, 58893, 63784, 68472, 70749, 76311, 79154, 84390, 87683, 92361, 96236, 102084, 102881, 110507, 110734, 117786, 119615, 126325, 127568, 133589, 136944, 141498, 145311, 150283, 152622, 158308, 161089, 167017 }; FinderPattern.canvas = QRCodeDecoder.Canvas; }
void Start() { globals = Globals.Instance; debugCanvas = FindObjectOfType <DebugCanvas>(); entityManager = World.Active.GetOrCreateManager <EntityManager>(); }
void Start() { globals = Globals.Instance; debugCanvas = FindObjectOfType <DebugCanvas>(); transforms = new TransformAccessArray(0, -1); }
static FinderPattern() { canvas = QRCodeDecoder.Canvas; }
public QRCodeDecoder() { numTryDecode = 0; results = ArrayList.Synchronized(new ArrayList(10)); canvas = new DebugCanvasAdapter(); }
public World(DebugCanvas debug = null) { _chunks = new List <Chunk>(); _debugCanvas = debug; }
public QRCodeDecoder() { this.numTryDecode = 0; this.results = ArrayList.Synchronized(new ArrayList(10)); QRCodeDecoder.canvas = (DebugCanvas) new DebugCanvasAdapter(); }
public QRCodeImageReader() { this.canvas = QRCodeDecoder.Canvas; }
static AlignmentPattern() { canvas = QRCodeDecoder.Canvas; }
void Start() => debugCanvas = FindObjectOfType <DebugCanvas>();
private static void RepeatNextCommand() { repeatPreviousIndex = (repeatPreviousIndex + 1).Clamp(0, previousCommands.Count); DebugCanvas.SetCommand(previousCommands.GetSafe(repeatPreviousIndex, string.Empty)); }
private static string HandleExitDebug(Match arg) { DebugCanvas.Toggle(); return(string.Empty); }
// Start is called before the first frame update void Awake() { Instance = this; }
private static void Log(Type type, string info, Action <object> consoleLogAction = null) { (consoleLogAction ?? UnityEngine.Debug.Log)($"[{type.ToString().ToUpper()}] {info}"); DebugCanvas.Print(info, type.ToString().ToUpper(), colors.Of(type, Color.white)); }
private void Awake() { m_instance = this; }
void Awake() { globals = Globals.Instance; debugCanvas = FindObjectOfType <DebugCanvas>(); }
public QRCodeDecoder() { numTryDecode = 0; results = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10)); canvas = new DebugCanvasAdapter(); }
void Awake() { Inst = this; }