Added follow cam

Added "Controlled" mesh classes
Added Global Lighting Class
Added Gamepad controls
Split terrain nodes into Height and Perlin classes
Fixed Splitmesh node stuff
This commit is contained in:
iDunnoDev
2022-05-09 17:50:22 +01:00
committed by iDunnoDev
parent bc906064e5
commit f6bba67897
58 changed files with 1743 additions and 351 deletions

View File

@ -1,13 +1,16 @@
#pragma once
#include "DirectXFramework.h"
#include "SharedMethods.h"
#include "GamePadController.h"
#include "TexturedCubeNode.h"
#include "MeshNode.h"
#include "SplitMeshNode.h"
#include "TerrainNode.h"
#include "ControlledSplitMeshNode.h"
#include "HeightMapTerrainNode.h"
#include "PerlinTerrainNode.h"
#include "SkyNode.h"
#include <ctime>
enum class ControlInputs {Forward, Back, TurnLeft, TurnRight, StrafeLeft, StrafeRight, Up, Down, Fire1, Fire2};
#include <set>
class Graphics2 : public DirectXFramework
{
@ -16,19 +19,26 @@ public:
void UpdateSceneGraph();
private:
bool _boosting;
float _boostMultiplier;
bool _boosting = false;
float _boostMultiplier = 1;
float _boostMin = 1;
float _boostStep = 0.5f;
float _boostMax = 5.0f;
float _flySpeed;
float _turnSpeed;
int _invertPitch;
float _currentRotation = 0.0f;
float _currentSideRotation = 0.0f;
float _currentPropRotation = 0.0f;
vector<ControlInputs> _currentInputs;
GamePadController _currentController;
// Changed from a vector to a set because sets only allow for unique values and thats all i want
set<ControlInputs> _currentInputs;
shared_ptr<ObjectNode> _currentPlayerObject;
void GetCurrentControlInputs();
void ResetCurrentControlInputs();