Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
|
\|/
Feel free to use it and share with everyone. I got a lot of csgo and pubg skins already
I got 10 knives on all my accounts already xD Try before they fix this
/IMG_02112014 See my screenshot bro!!!
var theDoor : Transform;
private var drawGUI = false;
private var doorIsClosed = true;
function Update ()
{
if (drawGUI == true && Input.GetKeyDown(KeyCode.E))
{
changeDoorState();
}
}
function OnTriggerEnter (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
drawGUI = true;
}
}
function OnTriggerExit (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
drawGUI = false;
}
}
function OnGUI ()
{
if (drawGUI == true)
{
GUI.Box (Rect (Screen.width*0.5-51, 200, 102, 22), "Press E to open");
}
}
function changeDoorState ()
{
if (doorIsClosed == true)
{
theDoor.animation.CrossFade("Open");
//theDoor.audio.PlayOneShot();
doorIsClosed = false;
yield WaitForSeconds(3);
theDoor.animation.CrossFade("Close");
//theDoor.audio.Play();
doorIsClosed = true;
}
}
#DoorLogic