Android Open Source - HexNanoController_Android Joystick Factory

From Project

Back to project page HexNanoController_Android.


The source code is released under:

Code license GNU GPL v2 Content license CC BY-NC-SA 4.0

If you think the Android project HexNanoController_Android 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

 * JoystickFactory/*from w  ww. j  a va2s . c  om*/
 *  Created on: May 26, 2011
 *      Author: Dmytro Baryskyy

package com.hexairbot.hexmini.ui.joystick;

import android.content.Context;

import com.hexairbot.hexmini.ui.Sprite.Align;

public class JoystickFactory 
  public enum JoystickType {
  public static JoystickBase createAnalogueJoystick(Context context, boolean isRollPitchJoystick,
                              JoystickListener analogueListener,
                              boolean yStickIsBounced)
    AnalogueJoystick joy = new AnalogueJoystick(context, Align.NO_ALIGN, isRollPitchJoystick, yStickIsBounced);
    return joy;
  public static JoystickBase createAcceleroJoystick(Context context, boolean isRollPitchJoystick,
                              JoystickListener acceleroListener,
                              boolean yStickIsBounced)
    AcceleratorJoystick joy = new AcceleratorJoystick(context, Align.NO_ALIGN, isRollPitchJoystick, yStickIsBounced);
    return joy;

Java Source Code List