hi, i am using to Time.timeScale for slowing down time by pressing "t". I am getting everything slowed down including the player. Is there anyway to slow down everything except the player. here is my script, i have still some works to do, like adding a coroutine for
making the time slow down temporary.
var slowammount: float = 0.2;
var visible;
var skin:GUISkin;
var slowtex : Texture;
function Start()
{
Time.timeScale = 1;
visible = false;
}
function OnGUI()
{
if (skin != null)
{
GUI.skin = skin;
}
if(visible == true){
if(Time.timeScale == slowammount) {
GUI.DrawTexture(new Rect(0,0,Screen.width, Screen.height), slowtex);
}
}
}
function Update ()
{
if (Time.timeScale == 1)
{
if (visible == false){
if (Input.GetKeyDown("t"))
{
visible = true;
Time.timeScale = slowammount;
}
}
}
}
↧