用一个Plane实现背景滚动
2017-04-20 本文已影响24人
胤醚貔貅
usingUnityEngine;
usingSystem.Collections;
publicclassBgScript:MonoBehaviour{
private MeshRenderer MR;
voidStart( ){
MR=GetComponent<MeshRenderer>( );
}
void Update( ){
MR.material.mainTextureOffset+=newVector2(Time.deltaTime*-1*1,0);
}
}