Itween淡入淡出

public TexTure2D tex;

public bool isFlag = false;

Start()

{

iTween.CameraTable.Add(tex,1);

}

OnGUI()

{

if(!isFlag)

{

if(创建按钮 FadeIn)

{

iTween.Camera.FadeTo(1,2.0f) 淡入时间随着第一个参数增加而增加

iTween.AudioTo(this.go,0,0.5f);

isFlag = true;

}

else{FadeOut

iTween.Camera.FadeTo(0,2.0f)

iTween.AudioTo(1f,1f,5f);

isFlag = false;

}

}

}

你可能感兴趣的:(unity3d)