package com.mycompany.mygame;

import android.os.Bundle;

import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import android.view.*;

public class MainActivity extends AndroidApplication {
    
	static float pointx;
	static float pointy;
	static boolean touch;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
        
        initialize(new MyGdxGame(), cfg);
		
		pointy=0;
		pointx=0;
		touch=false;
		
    }

	@Override
	public boolean onTouchEvent(MotionEvent event)
	{
		//X軸の取得
		pointx = event.getX();

		//Y軸の取得
		pointy = event.getY(); 
		
		touch = true;

		return touch;
	}
	
	public static float GetScreenX()
	{
		return pointx;
	}
	
	public static float GetScreenY()
	{
		return pointy;
	}
	
	
}
