source: GTP/trunk/App/Games/Jungle_Rumble/src/UserPlayer.cpp @ 1378

Revision 1378, 1.3 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#include "dxstdafx.h"
2#include ".\UserPlayer.h"
3
4
5UserPlayer::UserPlayer(void) : Player()
6{
7        setDesiredViewPoint(0, 3, -15); //100
8        setDesiredLookAtPoint(0, 2, 0); //50
9        this->finalTimer = -1;
10}
11
12UserPlayer::~UserPlayer(void)
13{
14}
15
16Vector UserPlayer::getDesiredLookAtPoint()
17{
18        Vector temp;
19        this->getAbsoluteVector(temp, this->lookAtPoint);
20        Vector origin = this->getAbsolutePosition();
21        temp.y = origin.y + this->lookAtPoint.y;
22        return temp;
23}
24
25Vector UserPlayer::getDesiredViewPoint()
26{
27        if(this->pActor!=NULL) {
28                this->pActor->getGlobalPose().getColumnMajor44(((NxF32 *) &this->myWorldMatrix.m[0][0]));
29        }
30        Vector temp;
31        this->getAbsoluteVector(temp, this->viewPoint);
32        Vector origin = this->getAbsolutePosition();
33        temp.y = origin.y + this->viewPoint.y;
34        return temp;
35}
36
37void UserPlayer::setDesiredLookAtPoint(float _x, float _y, float _z)
38{
39        this->lookAtPoint.x = _x;
40        this->lookAtPoint.y = _y;
41        this->lookAtPoint.z = _z;
42}
43
44void UserPlayer::setDesiredViewPoint(float _x, float _y, float _z)
45{
46        this->viewPoint.x = _x;
47        this->viewPoint.y = _y;
48        this->viewPoint.z = _z;
49}
50
51/*void UserPlayer::initWin()
52{
53        this->finalTimer = 5;
54}
55
56void UserPlayer::initLose()
57{
58        this->finalTimer = 5;
59}
60
61void UserPlayer::update(float dt)
62{
63        Player::update(dt);
64        if(this->finalTimer>0) {
65                this->finalTimer-=dt;
66        }
67}*/
Note: See TracBrowser for help on using the repository browser.