Skip to content

Instantly share code, notes, and snippets.

View gluschenko's full-sized avatar
:octocat:

Alexander Gluschenko gluschenko

:octocat:
View GitHub Profile
#include <iostream>
using namespace std;
///
static int Additive(int first, int second);
///
using UnityEngine;
using System;
using System.Collections.Generic;
public class WebData : MonoBehaviour
{
public bool isLoaded;
protected bool isUPP;
//Profile
using System;
public class lalala
{
void OnGUI() //Стандартный метод Unity
{
GUILayout.BegunArea(new Rect(100, 100, 300, 300));
GUILayout.BeginVertical();
for(int i = 0; i < 10; i++)
if(MenuId == 1)//Settings
{
GUI.Box(new Rect(Screen.width/2 - Perc(35), Screen.height/2 - Perc(35) + Perc(GUIAnim), Perc(70), Perc(70)), Local.Get("Settings"));
GUILayout.BeginArea(new Rect(Screen.width/2 - Perc(34), Screen.height/2 - Perc(30) + Perc(GUIAnim), Perc(68), Perc(55)));
Scroll = GUILayout.BeginScrollView(Scroll);
if(Platform.isStandalone() || Platform.isWeb ())
{
GUILayout.Label(Local.Get("Music volume"));
var target : Transform;
var distance = 10.0;
var xSpeed = 250.0;
var ySpeed = 120.0;
var yMinLimit = -20;
var yMaxLimit = 80;
var x = 0.0;
using System;
using System.Reflection;
class Program
{
static void Main()
{
Type t = Type.GetType("Foo");
MethodInfo method
= t.GetMethod("Bar", BindingFlags.Static | BindingFlags.Public);
public void StartGame()
{
GetComponent<Common>().SetMenuId(0);
///
if(PlayerPrefs.GetString("From", "") == "Game")
{
PlayerPrefs.SetString("From", "Menu");
GetComponent<Common>().CurrentLevel = PlayerPrefs.GetInt("CurrentLevel", 0);
GetComponent<Common>().TargetScore = PlayerPrefs.GetInt("TargetScore", 0);
GetComponent<Common>().Play();
using UnityEngine;
using System.Collections;
public class UI : MonoBehaviour {
public static bool TooltipButton(Rect rect, Texture Content, string Tooltip, int TooltipSide = 0)
{
Vector2 InputPos = InputPosition();
bool Button = GUI.Button(rect, Content);
using System;
using System.Collections;
/*
Usage:
* GUI.Label(new Rect(10, 10, 100, 100), Local.Get("Play"));
*
*/
public class Local {
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;
}