From: http://www.cocoachina.com/bbs/read.php? Tid-9883-fpage-7.html
Got a coverflow to play... Simplicity Code Just try it and get a simple coverflow .....
Simple code:
Copy code
-
- VaR numberofphotos = 5;
-
- VaR photoobjects = new array ();
-
-
- Function start (){
-
- Loadimages ();
-
- }
-
-
- Function loadimages (){
-
- For (VAR I = 0; I <numberofphotos; I ++)
-
- {
- Photoobjects = gameobject. createprimitive (primitivetype. Plane );
-
- Photoobjects. Transform. Position = vector3 (I-numberofphotos/2) * 8.2, 0.5, 0 );
-
- Photoobjects. Transform. eulerangles = vector3 (-270, (I-numberofphotos/2) *-45, 0 );
-
- Photoobjects. Renderer. Material. maintexture = resources. Load ("photo" + I );
-
- }
-
- }
|
Place a few images in assets/resources and name them photo0, photo1.. photo4...
The animation of the scroll effect is not done yet, and the reflection is not done yet ......
Image: 2009123.jpg