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
function isMobile() { | |
if( navigator.userAgent.match(/Android/i) | |
|| navigator.userAgent.match(/webOS/i) | |
|| navigator.userAgent.match(/iPhone/i) | |
|| navigator.userAgent.match(/iPad/i) | |
|| navigator.userAgent.match(/iPod/i) | |
|| navigator.userAgent.match(/BlackBerry/i) | |
|| navigator.userAgent.match(/Windows Phone/i)){ | |
return true; | |
} |
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
public static object GetPropValue(object src, string propName) | |
{ | |
return src.GetType().GetProperty(propName).GetValue(src, 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
var mid = function (v) { | |
var cx = 0; | |
var cy = 0; | |
for (var i = 0; i < v.length; i++) { | |
cx += v[i].x; | |
cy += v[i].y; | |
} | |
cx /= v.length; |
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; | |
using System.Collections.Generic; | |
public class ComboText : MonoBehaviour { | |
public static List<ComboEntry> Entries = new List<ComboEntry>(); | |
public float Speed = 10; | |
public static float Offset = 90; | |
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; | |
using System.Collections.Generic; | |
public class Test : MonoBehaviour { | |
List<GameObject> people = new List<GameObject>(); | |
Vector2 ScrollPos = new Vector2(0, 0); |
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; | |
using System.Collections.Generic; | |
public class DebugConsole : MonoBehaviour | |
{ | |
struct ConsoleMessage | |
{ | |
public readonly string message; | |
public readonly string stackTrace; |
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
function getmess(){ | |
$.ajax({ | |
url:"get_mess.php", | |
type:"POST", | |
data:{"id":id}, | |
cahce:false, | |
timeout:30000, | |
async:true, | |
success:function(result){ | |
$("#response").html(result); |
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
<html> | |
<head> | |
<title>Генератор случайных чисел</title> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script> | |
function Write(id, val) { | |
Find(id).innerHTML = val; | |
} |
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
public static T[] Concat<T>(this T[] x, T[] y) | |
{ | |
if (x == null) throw new ArgumentNullException("x"); | |
if (y == null) throw new ArgumentNullException("y"); | |
int oldLen = x.Length; | |
Array.Resize<T>(ref x, x.Length + y.Length); | |
Array.Copy(y, 0, x, oldLen, y.Length); | |
return x; | |
} |
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; | |
using System.Collections; | |
/* | |
Usage: | |
* GUI.Label(new Rect(10, 10, 100, 100), Local.Get("Play")); | |
* | |
*/ | |
public class Local { |