#pragma once
#ifdef _WIN32
#else
#include <android_native_app_glue.h>
#endif
#include <vector>
#include "BaseGesture.h"

namespace star
{
	struct WinInputState;

	class GestureManager {
	public:
		GestureManager();
		~GestureManager();
		void Update(const Context& context);
		void AddGesture(BaseGesture* gesture);
		void RemoveGesture(BaseGesture* gesture);

#ifdef _WIN32
		void OnUpdateWinInputState();
#else
		void OnTouchEvent(AInputEvent* pEvent);
#endif
	private:
		std::vector<BaseGesture*> m_GestureVec;
		double m_dTime;
		double m_TotalTime;

		GestureManager(const GestureManager& t);
		GestureManager(GestureManager&& t);
		GestureManager& operator=(const GestureManager& t);
	};
}

#pragma once
#ifdef _WIN32
#else
#include <android_native_app_glue.h>
#endif
#include <vector>
#include "BaseGesture.h"

namespace star
{
	struct WinInputState

	// [COMMENT] Gesture-Tags
	// Gestures should also be given a user-defined tag 
	// when added to the the manager.

	// this way the user can look them up by tag, rather then
	// on pointer ( for adding one, or removing one, or getting one )
	// Part of the beauty of this kind of managing concept is
	// that the user doesn't have to bother about the pointers
	// as that's all managed inside the manager.

	// On a side note... It's probably a good practice that the user defines
	// these gestures in the Game class, as scenes get created
	// and deleted everytime the screen rotates on android.

	class GestureManager {
	public:
		GestureManager();
		~GestureManager();
		void Update(const Context& context);
		void AddGesture(BaseGesture* gesture);
		void RemoveGesture(BaseGesture* gesture);

#ifdef _WIN32
		void OnUpdateWinInputState();
#else
		void OnTouchEvent(AInputEvent* pEvent);
#endif
	private:
		std::vector<BaseGesture*> m_GestureVec;
		double m_dTime;
		double m_TotalTime;

		GestureManager(const GestureManager& t);
		GestureManager(GestureManager&& t);
		GestureManager& operator=(const GestureManager& t);
	};
}

Comment for pieter in Gesture manager. Read && fix
Comment for pieter in Gesture manager. Read && fix
