MCPcopy Create free account
hub / github.com/android/ndk-samples / PlayScene

Method PlayScene

endless-tunnel/app/src/main/cpp/play_scene.cpp:50–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 "d70 f550. f650. f750. f850."};
49
50PlayScene::PlayScene() : Scene() {
51 mOurShader = NULL;
52 mTrivialShader = NULL;
53 mTextRenderer = NULL;
54 mShapeRenderer = NULL;
55 mShipSteerX = mShipSteerZ = 0.0f;
56 mFilteredSteerX = mFilteredSteerZ = 0.0f;
57
58 mPlayerDir = glm::vec3(0.0f, 1.0f, 0.0f); // forward
59 mDifficulty = 0;
60 mUseCloudSave = false;
61
62 mCubeGeom = NULL;
63 mTunnelGeom = NULL;
64
65 mObstacleCount = 0;
66 mFirstObstacle = 0;
67 mFirstSection = 0;
68 mSteering = STEERING_NONE;
69 mPointerId = -1;
70 mPointerAnchorX = mPointerAnchorY = 0.0f;
71
72 mWallTexture = NULL;
73
74 memset(mMenuItemText, 0, sizeof(mMenuItemText));
75 mMenuItemText[MENUITEM_UNPAUSE] = S_UNPAUSE;
76 mMenuItemText[MENUITEM_QUIT] = S_QUIT;
77 mMenuItemText[MENUITEM_START_OVER] = S_START_OVER;
78 mMenuItemText[MENUITEM_RESUME] = S_RESUME;
79
80 memset(mMenuItems, 0, sizeof(mMenuItems));
81 mMenuItemCount = 0;
82
83 mMenu = MENU_NONE;
84 mMenuSel = 0;
85
86 mSignText = NULL;
87 mSignTimeLeft = 0.0f;
88
89 mShowedHowto = false;
90 mLifeGeom = NULL;
91
92 mLives = PLAYER_LIVES;
93
94 mRollAngle = 0.0f;
95
96 mPlayerSpeed = 0.0f;
97 mBlinkingHeart = false;
98 mGameStartTime = Clock();
99
100 mBonusInARow = 0;
101 mLastCrashSection = -1;
102
103 mFrameClock.SetMaxDelta(MAX_DELTA_T);
104 mLastAmbientBeepEmitted = 0;
105 mMenuTouchActive = false;
106
107 mCheckpointSignPending = false;

Callers

nothing calls this directly

Calls 2

ClockFunction · 0.85
SetMaxDeltaMethod · 0.80

Tested by

no test coverage detected