示例#1
0
 void Start()
 {
     mTargetColor      = ScriptCommon.ColorRandom(mColorAlpha);
     mCurrentColor     = ScriptCommon.ColorRandom(mColorAlpha);
     mTargetRotation   = ScriptCommon.RotationRandom();
     mOriginalPosition = new Vector3(viewer.transform.position.x, viewer.transform.position.y, viewer.transform.position.z);
     mTargetZ          = ScriptCommon.RandomSignedFloat(mOriginalPosition.z, mTargetMaxZ);
     UpdateMaterialColor();
 }
示例#2
0
 void Update()
 {
     if (UpdateMaterialColor())
     {
         mTargetColor = ScriptCommon.ColorRandom(mColorAlpha);
     }
     if (UpdateCameraRotation())
     {
         mTargetRotation = ScriptCommon.RotationRandom();
     }
     if (UpdateCameraPosition())
     {
         mTargetZ = ScriptCommon.RandomSignedFloat(mOriginalPosition.z, mTargetMaxZ);
     }
 }