PageRenderTime 19ms CodeModel.GetById 7ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/Code/src/com/game/InputDevice/JoystickInputDevice.java

https://bitbucket.org/DeveloperUX/behaviortree
Java | 61 lines | 35 code | 15 blank | 11 comment | 0 complexity | aebf496ffa24732de3146ed5201c6237 MD5 | raw file
 1package com.game.InputDevice;
 2
 3import android.os.Handler;
 4import android.os.Message;
 5import android.util.Log;
 6import android.view.MotionEvent;
 7
 8import com.game.MsgType;
 9import com.game.Vec2;
10import com.game.Scenes.PlayScene;
11
12public class JoystickInputDevice extends InputDevice 
13{
14
15	Vec2 mainCirclePos;
16	Vec2 dirCirclePos;
17	
18	public JoystickInputDevice(PlayScene playScene) 
19	{
20		super(playScene);
21		
22		// TODO: Set this positions relative to device size
23		this.mainCirclePos = new Vec2(10,165);
24		this.dirCirclePos = new Vec2(50, 200);
25		
26		this.deviceHandler = new Handler()
27		{			
28			public void handleMessage(Message msg)
29			{
30				
31			}
32		};
33	}
34
35	@Override
36	public void Start() 
37	{
38		// TODO Auto-generated method stub
39
40	}
41
42	@Override
43	public void Update() 
44	{
45		// TODO Auto-generated method stub
46
47	}
48	
49	/**
50	 * Gets the main circle position
51	 * @return The main circle position
52	 */
53	public Vec2 GetMainCirclePos() { return this.mainCirclePos; }
54	
55	/**
56	 * Gets the direction circle position
57	 * @return The direction circle position
58	 */
59	public Vec2 GetDirCirclePos() { return this.dirCirclePos; }
60
61}