فهرست منبع

Made members public

Daniele Bartolini 12 سال پیش
والد
کامیت
19f8c8a7e4
4فایلهای تغییر یافته به همراه6 افزوده شده و 10 حذف شده
  1. 1 1
      engine/input/Accelerometer.h
  2. 3 5
      engine/input/Keyboard.h
  3. 1 3
      engine/input/Mouse.h
  4. 1 1
      engine/input/Touch.h

+ 1 - 1
engine/input/Accelerometer.h

@@ -50,7 +50,7 @@ public:
 		return m_orientation;
 	}
 
-private:
+public:
 
 	Vec3			m_orientation;
 

+ 3 - 5
engine/input/Keyboard.h

@@ -76,7 +76,7 @@ public:
 	{
 		CE_ASSERT(key >= 0 && key < MAX_KEYCODES, "KeyCode out of range: %d", key);
 
-		return (m_state[key] == true) && (m_keys[key] == m_current_frame);
+		return (m_state[key] == true);
 	}
 
 	/// Returns whether the specified @a key is released in the current frame.
@@ -96,11 +96,9 @@ public:
 	/// Returns whether any key is released in the current frame.
 	bool any_released() const
 	{
-		return key_released(m_last_key);
+		return key_pressed(m_last_key);
 	}
 
-private:
-
 	void update(uint64_t frame, KeyCode k, bool state)
 	{
 		CE_ASSERT(k >= 0 && k < MAX_KEYCODES, "KeyCode out of range: %d", k);
@@ -110,7 +108,7 @@ private:
 		m_state[k] = state;
 	}
 
-private:
+public:
 
 	uint8_t			m_modifier;
 

+ 1 - 3
engine/input/Mouse.h

@@ -158,8 +158,6 @@ public:
 		set_cursor_xy(Vec2(position.x * (float) window_width, position.y * (float) window_height));
 	}
 
-private:
-
 	//-----------------------------------------------------------------------------
 	void update(uint64_t frame, MouseButton b, bool state)
 	{
@@ -170,7 +168,7 @@ private:
 		m_state[b] = state;
 	}
 
-private:
+public:
 
 	// The current frame number
 	uint64_t		m_current_frame;

+ 1 - 1
engine/input/Touch.h

@@ -88,7 +88,7 @@ public:
 		return Vec2(data.relative_x, data.relative_y);
 	}
 
-private:
+public:
 
 	PointerData		m_pointers[MAX_POINTER_IDS];