cs sdk v 1.14 released
Home | Product | Documents | Tutorials | FAQ | Download | Forum | Contacts | Link
Cross Suit
Cross Suit SDK
LUA tutorials
Support
Product parts
Virtual File system
Demo Games
3D Engine
gvSystem(dx9)
Link
00001 #pragma once 00002 00003 00004 //enum OBJECT_TYPE; 00005 enum OBJECT_TYPE { 00006 DEFAULT, 00007 BALL, 00008 WALL, 00009 PONGBALL, 00010 PONGPADDLE, 00011 LINE, 00012 HERO, 00013 GHOST, 00014 GATE, 00015 CHECKPOINT 00016 }; 00017 00018 // 00019 // Simple Object for 2d collision. 00020 // 00021 class gv_gameobject2d 00022 { 00023 public: 00024 00030 virtual ~gv_gameobject2d(); 00031 00037 virtual void Input(); 00043 virtual void Update(); 00049 virtual void Render2D(); 00056 virtual void Collision(gv_gameobject2d* object); 00057 00067 bool CheckIntersection(const gv_gameobject2d* p_Object) const; 00077 float CheckCircleIntersection(const gv_gameobject2d* p_Object) const; 00078 00085 void SetTranslation(const XVECTOR2& translation); 00093 XVECTOR2 GetTranslation() const; 00094 00103 void SetCenterTranslation(const XVECTOR2& translation); 00112 XVECTOR2 GetCenterTranslation() const; 00113 00120 void SetLocation(const XVECTOR2& location); 00128 XVECTOR2 GetLocation() const; 00129 00138 void SetCenterLocation(const XVECTOR2& location); 00147 XVECTOR2 GetCenterLocation() const; 00148 00155 void SetRotationCenter(const XVECTOR2& rotationCenter); 00161 XVECTOR2 GetRotationCenter() const; 00162 00169 void SetRotation(const float& rotation); 00175 float GetRotation() const; 00176 00184 void SetScaling(const XVECTOR2& scaling); 00190 XVECTOR2 GetScaling() const; 00191 00198 void SetModulateColor (unsigned long modulateColor); 00204 unsigned long GetModulateColor() const; 00205 00212 void SetWidth(const float& width); 00218 float GetWidth() const; 00225 float GetScaledWidth() const; 00226 00233 void SetHeight(const float& height); 00239 float GetHeight() const; 00246 float GetScaledHeight() const; 00247 00254 void SetBoundingRadius(const float& boundingRadius); 00260 float GetBoundingRadius() const; 00261 00266 XVECTOR2 GetCenter() const; 00272 XVECTOR2 GetScaledCenter() const; 00273 00282 void SetObjectType(OBJECT_TYPE objectType); 00288 OBJECT_TYPE GetObjectType() const; 00289 00297 void SetVelocity(const XVECTOR2& velocity); 00303 XVECTOR2 GetVelocity() const; 00304 00311 void SetName(char* szName); 00317 char* GetName() const; 00318 00319 protected: 00320 00324 gv_gameobject2d(); 00325 00326 XVECTOR2 location; 00327 XVECTOR2 rotationCenter; 00328 float rotation; 00329 XVECTOR2 scaling; 00330 unsigned long modulateColor; 00331 float width; 00332 float height; 00333 float boundingRadius; 00334 OBJECT_TYPE objectType; 00335 XVECTOR2 velocity; 00336 char* name; 00337 };
Copyright(C) gvSystem & GamePlus All Rights Reserved.