Skip to content

Instantly share code, notes, and snippets.

View gluschenko's full-sized avatar
:octocat:

Alexander Gluschenko gluschenko

:octocat:
View GitHub Profile
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);
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 System;
using System.Reflection;
class Program
{
static void Main()
{
Type t = Type.GetType("Foo");
MethodInfo method
= t.GetMethod("Bar", BindingFlags.Static | BindingFlags.Public);
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;
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"));
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++)
using UnityEngine;
using System;
using System.Collections.Generic;
public class WebData : MonoBehaviour
{
public bool isLoaded;
protected bool isUPP;
//Profile
#include <iostream>
using namespace std;
///
static int Additive(int first, int second);
///