Question by
jardante · Nov 30, 2015 at 04:31 PM ·
convertjava to c#
change my code from java to c#
this is my code but i need it in c#
help me to change my code from java to c#
pragma strict
var timer : float = 10.0; var plusTime : float = 10.0;
var guiShow : boolean = false;
function Update() { timer -= Time.deltaTime;
if(timer <= 0)
{
Application.LoadLevel("juego");
timer = 0;
}
}
function OnGUI() { GUI.Box(Rect(300, 10, 50, 20), "" + timer.ToString("0"));
if(guiShow == true)
{
GUI.Box(Rect(65, 10, 50, 20), "+" + plusTime.ToString("0"));
ShowGUI();
}
}
function ShowGUI() { yield WaitForSeconds(2); guiShow = false; }
Comment
Answer by Jessespike · Nov 30, 2015 at 05:36 PM
Unity Tutorials - C# vs Javascript
Try to do it yourself first. If you get stuck with errors, post them here.
Also that's not Java. It's JavaScript.
Your answer
![](https://koobas.hobune.stream/wayback/20220612050902im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can someone help me please? 0 Answers
Convert Java to C# 2 Answers
JavaScript to C# 1 Answer
Heightmap From Texture - Script Converter 2 Answers
Convert Java to C# 1 Answer