Android Open Source - NotATop Surface View Factory






From Project

Back to project page NotATop.

License

The source code is released under:

GNU General Public License

If you think the Android project NotATop 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.gg.view;
/*  w ww  .  j  ava 2s .com*/
import android.app.Activity;
import android.content.Context;
import android.view.SurfaceView;
import android.view.View;

/*    ??????????????????????????????????????????????????????    */
public class SurfaceViewFactory {

  public final static int WELCOME = 0; // ??????????????
  public final static int MAIN_MENU = 1; // ????????????????
  public final static int CLASSIC_GAME = 2; // ????????????????
  public final static int SELECT = 3; // ?????????????
  public final static int SCORE = 4; // ??????????????
  public final static int HELP = 5; // ???????????????
  public final static int END = 6;
  public final static int FIRST_TIME = 7;
  public final static int GAME_MODE = 8;
  public final static int TIME_GAME = 9;
  

  private static SurfaceView surfaceView; // ????????????????????????????????????
  

  private SurfaceViewFactory(){ // ????????????????
    
  }
  
  public static SurfaceView getView(MainActivity mainActivity, int index){ // ???????????????????????????????????
    switch(index){
    case WELCOME:
      surfaceView = new WelcomeSurfaceView(mainActivity);
      break;
    case MAIN_MENU:
      surfaceView = new MainMenuSurfaceView(mainActivity);
      break;
    case CLASSIC_GAME:
      surfaceView = new ClassicGameSurfaceView(mainActivity);
      break;
    case SELECT:
      surfaceView = new SelectSurfaceView(mainActivity);
      break;  
    case SCORE:
      surfaceView = new ScoreSurfaceView(mainActivity);
      break;
    case HELP:
      surfaceView = new HelpSurfaceView(mainActivity);
      break;
    case END:
      surfaceView = new EndSurfaceView(mainActivity);
      break;
    case FIRST_TIME:
      surfaceView = new FirstTimeSurfaceView(mainActivity);
      break;
    case GAME_MODE:
      surfaceView = new GameModeSurfaceView(mainActivity);
      break;
    case TIME_GAME:
      surfaceView = new TimeGameSurfaceView(mainActivity);
      break;
    default:
      break;
    }
    return surfaceView;
  }
  
  
}




Java Source Code List

com.gg.game.ClassicGame.java
com.gg.game.ClassicGame.java
com.gg.game.GameFrame.java
com.gg.game.GameFrame.java
com.gg.game.TimeGame.java
com.gg.game.TimeGame.java
com.gg.module.DrawBackground.java
com.gg.module.DrawBackground.java
com.gg.module.DrawScore.java
com.gg.module.DrawScore.java
com.gg.module.DrawTrack.java
com.gg.module.DrawTrack.java
com.gg.module.SelectControl.java
com.gg.module.SelectControl.java
com.gg.module.SoundControl.java
com.gg.module.SoundControl.java
com.gg.module.VoiceControl.java
com.gg.module.VoiceControl.java
com.gg.top.BasicTop.java
com.gg.top.BasicTop.java
com.gg.top.DrawCircle.java
com.gg.top.DrawCircle.java
com.gg.top.DrawCone.java
com.gg.top.DrawCone.java
com.gg.top.DrawCylinder.java
com.gg.top.DrawCylinder.java
com.gg.top.DrawTop.java
com.gg.top.DrawTop.java
com.gg.util.Circle.java
com.gg.util.Circle.java
com.gg.util.Constant.java
com.gg.util.Constant.java
com.gg.util.DateUtil.java
com.gg.util.DateUtil.java
com.gg.util.Direction.java
com.gg.util.Direction.java
com.gg.util.Line.java
com.gg.util.Line.java
com.gg.util.Point.java
com.gg.util.Point.java
com.gg.util.TextureRect.java
com.gg.util.TextureRect.java
com.gg.util.TrackPoint.java
com.gg.util.TrackPoint.java
com.gg.util.Track.java
com.gg.util.Track.java
com.gg.util.Utils.java
com.gg.util.Utils.java
com.gg.view.ClassicGameSurfaceView.java
com.gg.view.ClassicGameSurfaceView.java
com.gg.view.EndSurfaceView.java
com.gg.view.EndSurfaceView.java
com.gg.view.FirstTimeSurfaceView.java
com.gg.view.FirstTimeSurfaceView.java
com.gg.view.GameModeSurfaceView.java
com.gg.view.GameModeSurfaceView.java
com.gg.view.HelpSurfaceView.java
com.gg.view.HelpSurfaceView.java
com.gg.view.MainActivity.java
com.gg.view.MainActivity.java
com.gg.view.MainMenuSurfaceView.java
com.gg.view.MainMenuSurfaceView.java
com.gg.view.ScoreSurfaceView.java
com.gg.view.ScoreSurfaceView.java
com.gg.view.SelectSurfaceView.java
com.gg.view.SelectSurfaceView.java
com.gg.view.SurfaceViewFactory.java
com.gg.view.SurfaceViewFactory.java
com.gg.view.TimeGameSurfaceView.java
com.gg.view.TimeGameSurfaceView.java
com.gg.view.WelcomeSurfaceView.java
com.gg.view.WelcomeSurfaceView.java