Coverflow implementation in Unity

Source: Internet
Author: User

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

  1. VaR numberofphotos = 5;
  2. VaR photoobjects = new array ();
  3. Function start (){
  4. Loadimages ();
  5. }
  6. Function loadimages (){
  7. For (VAR I = 0; I <numberofphotos; I ++)
  8. {
  9. Photoobjects = gameobject. createprimitive (primitivetype. Plane );
  10. Photoobjects. Transform. Position = vector3 (I-numberofphotos/2) * 8.2, 0.5, 0 );
  11. Photoobjects. Transform. eulerangles = vector3 (-270, (I-numberofphotos/2) *-45, 0 );
  12. Photoobjects. Renderer. Material. maintexture = resources. Load ("photo" + I );
  13. }
  14. }

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.