DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
#pragma once #include "Game3DInstance.h" #include "Light.h" #include "Map.h" #include "DataTypes.h" namespace DarkBattle{ /* #define CHARACTER_MOVEUP 0 #define CHARACTER_MOVEDOWN 1 #define CHARACTER_MOVELEFT 2 #define CHARACTER_MOVERIGHT 3*/ //typedef float float3[3];//tolua_export class Light; class Character: public Game3DInstance{//tolua_export private: float hitPoint; Light* light; byte type; static Character* theHero; //path finding data Vec2Queue wayPoints; Vec3Queue smoothWP; DistanceMap distanceMap; CloseList closeList; OpenListPriority openList; //action evaluation data Matrix
isCovered; Vec2Queue visitedPos; char* name; static MyHashTable
pool; bool isMoving; Vec2 bestSoFar;//use in all evaluate step bool bestCovered; int bestDistance; bool found; Vec3 evaluatedPos; //use in all action evaluation bool evaluatedThisFrame; Vec2 curPathPos;//use in MakePathStep Vec3 smoothRefPos, smoothPrePos; //use in MakeSmoothPath bool forceStop; public: enum Direction{UP,DOWN,LEFT,RIGHT}; Character(Game3DObject* pObjectResource, btRigidBody* pRigidBody, const char* name); static Character* Add(char* modelName, const char* name);//tolua_export static Character* Get(char* name);//tolua_export #define CHARACTER_NOTCHARACTER -1 #define CHARACTER_TYPES 2 #define CHARACTER_HERO 0 #define CHARACTER_SOLDIER 1 static const char* characterNames[CHARACTER_TYPES]; static int identifyCharacterType(const char* name); void MoveTo(Vec3 pos);//tolua_export void SetPos(Vec3 pos);//tolua_export Vec3 GetPos();//tolua_export bool IsAt(Vec3 pos);//tolua_export btVector3 GetCenter(); void Move(Direction direction); void Stop();//tolua_export inline bool IsWayPointEmpty(){return smoothWP.IsEmpty();};//tolua_export inline Vec3 WayPointPop(){return smoothWP.Pop();};//tolua_export //step functions void InitComputeDistanceMap();//tolua_export void InitComputeDistanceMapBreath();//tolua_export bool ComputeDistanceMapStep(Vec3 to);//tolua_export bool ComputeDistanceMapBreathStep();//tolua_export void InitMakePath(Vec3 to);//tolua_export bool MakePathStep();//tolua_export void InitMakeSmoothPath(Vec3 to);//tolua_export bool MakeSmoothPathStep(Vec3 to);//tolua_export bool InitEvaluateEvadeStep();//tolua_export bool EvaluateEvadeStep();//tolua_export inline Vec3 GetEvaluatedPos(){return evaluatedPos;};//tolua_export inline bool IsEvaluateSuccess(){return found;};//tolua_export void MakePath(Vec3 to);//must not export void MakeSmoothPath(Vec3 to);//must not export void ThinkStep(); static bool IsCovered(const Vec3 &from, const Vec3 &to);//tolua_export static Character* GetHero();//tolua_export static void SetHero(Character* hero);//tolua_export void Jump(); void FrameMove(float elapsedTime); static bool CheckNameBelongToThisClass(const char* name); void FireToHero();//tolua_export inline Vec2Queue& GetWayPoints(){return wayPoints;}; inline DistanceMap& GetDistanceMap(){return distanceMap;}; inline char* GetName(){return name;}//tolua_export inline static MyHashTable
& GetPool(){return pool;}; //tolua_begin static float FireRange; static float FireHeight; static int EvaluateRange; static int WayPointQueueLength; //tolua_end };//tolua_export }
Character.h
Page URL
File URL
Prev
5/65
Next
Download
( 3 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.