Android Open Source - GameWorker Main Activity






From Project

Back to project page GameWorker.

License

The source code is released under:

Apache License

If you think the Android project GameWorker 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.al.gameworker;
//from  w w w.  j  a  v a  2 s.c  o  m
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.al.gameengine.sprite.GameView;

/**
 * Launcher Activity to call for the game.
 * @author AL
 *
 */
public class MainActivity extends Activity
{

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
      super.onCreate(savedInstanceState);
        // requesting to turn the title OFF
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        // making it full screen
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        
        // set our MainGamePanel as the View
        setContentView(new GameView(this));
    }
}




Java Source Code List

com.al.gameengine.Animation.java
com.al.gameengine.Background.java
com.al.gameengine.Direction.java
com.al.gameengine.GameEngine.java
com.al.gameengine.Position.java
com.al.gameengine.Scene.java
com.al.gameengine.sprite.GameView.java
com.al.gameengine.sprite.SpriteManager.java
com.al.gameengine.sprite.Sprite.java
com.al.gameworker.MainActivity.java