1#include "Library/Camera/CameraRequestParamHolder.h"
2
3namespace al {
4
5CameraRequestParamHolder::CameraRequestParamHolder() = default;
6
7void CameraRequestParamHolder::resetPlayerType() {
8 mIsCurrFlyer = mIsPrevFlyer;
9 mFlyerCamera = nullptr;
10 mIsCurrHighSpeedMove = mIsPrevHighSpeedMove;
11 mHighSpeedMoveCamera = nullptr;
12 mIsCurrHighJump = mIsPrevHighJump;
13 mHighJumpCamera = nullptr;
14 mIsCurrNotTouchGround = mIsPrevNotTouchGround;
15 mNotTouchGroundCamera = nullptr;
16}
17
18bool CameraRequestParamHolder::isPlayerTypeFlyer() const {
19 return mFlyerCamera && mIsCurrFlyer;
20}
21
22void CameraRequestParamHolder::onPlayerTypeFlyer(const IUseCamera* camera, const char* name) {
23 mIsCurrFlyer = true;
24 mFlyerCamera = camera;
25}
26
27bool CameraRequestParamHolder::isPlayerTypeHighSpeedMove() const {
28 return mHighSpeedMoveCamera && mIsCurrHighSpeedMove;
29}
30
31void CameraRequestParamHolder::onPlayerTypeHighSpeedMove(const IUseCamera* camera,
32 const char* name) {
33 mIsCurrHighSpeedMove = true;
34 mHighSpeedMoveCamera = camera;
35}
36
37bool CameraRequestParamHolder::isPlayerTypeHighJump() const {
38 return mHighJumpCamera && mIsCurrHighJump;
39}
40
41void CameraRequestParamHolder::onPlayerTypeHighJump(const IUseCamera* camera, const char* name) {
42 mIsCurrHighJump = true;
43 mHighJumpCamera = camera;
44}
45
46bool CameraRequestParamHolder::isPlayerTypeNotTouchGround() const {
47 return mNotTouchGroundCamera && mIsCurrNotTouchGround;
48}
49
50void CameraRequestParamHolder::onPlayerTypeNotTouchGround(const IUseCamera* camera,
51 const char* name) {
52 mIsCurrNotTouchGround = true;
53 mNotTouchGroundCamera = camera;
54}
55
56void CameraRequestParamHolder::onRideObj(const IUseCamera* camera, const char* name) {
57 mIsCurrRideObj = true;
58 mRideObjCamera = camera;
59}
60
61void CameraRequestParamHolder::offRideObj(const IUseCamera* camera, const char* name) {
62 mRideObjCamera = nullptr;
63 mIsCurrRideObj = mIsPrevRideObj;
64}
65
66} // namespace al
67