Android Open Source - Phylane Loading Screens






From Project

Back to project page Phylane.

License

The source code is released under:

COPYRIGHT 2014 TRISTON JONES

If you think the Android project Phylane listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.lvadt.phylane.model;
/*  w  w w .  ja v  a 2s. c om*/
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.provider.CalendarContract;

import com.lvadt.phylane.R;

import java.util.Random;

/**
 * Created by Triston on 4/13/2014.
 * Just a simple class that contains the different loading screens
 */
public class LoadingScreens {

    public static class Screen{
        public int id;
        public String message;
        //Alternate to the default white
        public int color = -1;

        Screen(int i, String m)
        {
            id = i;
            message = m;
        }
        Screen(int i, String m, int c){
            id = i;
            message = m;
            color = c;
        }
    }

    static Screen[] screens = {
            new Screen(R.drawable.load_flyerone,
                    "The first powered plane, the Flyer I, was built by the Wright Brothers in 1903. " +
                    "It weighed only 605 pounds (274kg), and had a maximum speed of 30mph(48 km/h)"),
            new Screen(R.drawable.load_flyerone,
                    "The Flyer I, or the Wright Flyer, was the first engine powered airplane. It was " +
                    "flown a total of 4 times and had its first flight on December 17th, 1903"),
            new Screen(R.drawable.load_lift,
                    "The Wright Brothers used the same formula for lift we use today: " +
                    "L = kSV^2Cl, or Lift equals coefficient of air pressure multiplied by surface area times " +
                    "velocity times the coefficient of lift. Long, I know.", Color.BLACK),
            new Screen(R.drawable.load_lift,
                    "In the lift equation, there are two coefficients, that of air pressure and of lift. " +
                    "The coefficient of air pressure is known as the Smeaton coefficient, and the coefficient " +
                    "of lift depends on the wing shape.", Color.BLACK),
    };

    /**
     * Returns a random loading screen
     * @return a new screen
     */
    public static Screen randomLoadScreen(){
        Random rand = new Random();
        int s = rand.nextInt(screens.length);
        return screens[s];
    }


}




Java Source Code List

com.lvadt.phylane.BuildConfig.java
com.lvadt.phylane.activity.Fly.java
com.lvadt.phylane.activity.HomeScreen.java
com.lvadt.phylane.activity.LevelComplete.java
com.lvadt.phylane.activity.LoadScreen.java
com.lvadt.phylane.activity.MainMenu.java
com.lvadt.phylane.activity.MessagePopup.java
com.lvadt.phylane.activity.Prefs.java
com.lvadt.phylane.activity.Splash.java
com.lvadt.phylane.activity.Store.java
com.lvadt.phylane.activity.Tutorial.java
com.lvadt.phylane.graphics.GLRenderer.java
com.lvadt.phylane.graphics.Sprite.java
com.lvadt.phylane.model.GameObject.java
com.lvadt.phylane.model.Level.java
com.lvadt.phylane.model.LoadingScreens.java
com.lvadt.phylane.model.Objects.java
com.lvadt.phylane.model.Plane.java
com.lvadt.phylane.model.Player.java
com.lvadt.phylane.model.WorldObject.java
com.lvadt.phylane.physics.Physics.java
com.lvadt.phylane.utils.Data.java
com.lvadt.phylane.utils.OnSwipeTouchListener.java
com.lvadt.phylane.utils.Sound.java