Skip to content

Commit

Permalink
Update for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravbug committed Sep 30, 2024
1 parent 3524b51 commit 342a1d7
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion RavEngine
4 changes: 2 additions & 2 deletions Samples/AirHockey/Player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Player : public RavEngine::ComponentWithOwner, public RavEngine::Queryable
protected:
decimalType sensitivity = 15;
public:
Player(entity_t id) : ComponentWithOwner(id){}
Player(RavEngine::Entity id) : ComponentWithOwner(id){}
void MoveUpDown(float amt);

void MoveLeftRight(float amt);
Expand All @@ -21,7 +21,7 @@ class BotPlayer : public RavEngine::ScriptComponent{
RavEngine::ComponentHandle<Player> pl;
bool leftSide;
public:
BotPlayer(entity_t owner, decltype(pl) p, bool leftSide) : pl(p), leftSide(leftSide), ScriptComponent(owner){}
BotPlayer(RavEngine::Entity owner, decltype(pl) p, bool leftSide) : pl(p), leftSide(leftSide), ScriptComponent(owner){}

void Tick(float scale) override;
};
2 changes: 1 addition & 1 deletion Samples/AirHockey/Puck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Puck::Create()
dyn.AddReceiver(callbackptr);
}

PuckScript::PuckScript(entity_t owner) : ScriptComponent(owner), sounds{
PuckScript::PuckScript(Entity owner) : ScriptComponent(owner), sounds{
New<AudioAsset>("hockeyhit1.wav"),
New<AudioAsset>("hockeyhit2.wav"),
New<AudioAsset>("hockeyhit3.wav"),
Expand Down
4 changes: 2 additions & 2 deletions Samples/AirHockey/Puck.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ namespace RavEngine {

//marker for querying
struct PuckComponent : public RavEngine::ComponentWithOwner{
PuckComponent(entity_t owner) : ComponentWithOwner(owner){}
PuckComponent(RavEngine::Entity owner) : ComponentWithOwner(owner){}
};

struct PuckScript : public RavEngine::ScriptComponent, public RavEngine::Queryable<PuckScript,RavEngine::ScriptComponent>{

using RavEngine::Queryable<PuckScript,RavEngine::ScriptComponent>::GetQueryTypes;

RavEngine::Array<Ref<RavEngine::AudioAsset>,4> sounds;
PuckScript(entity_t owner);
PuckScript(RavEngine::Entity owner);
void Tick(float scale) override{}
void OnColliderEnter(RavEngine::PhysicsBodyComponent&, const RavEngine::ContactPairPoint* contactPoints, size_t numContactPoints);
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/Animation/CameraEntity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct CameraScript : public RavEngine::ComponentWithOwner {
vector3 rightVector = vector3(0, 0, 0);
decimalType speedIncrement = 0;

CameraScript(entity_t owner, const decltype(target)& t) : target(t), ComponentWithOwner(owner) {}
CameraScript(RavEngine::Entity owner, const decltype(target)& t) : target(t), ComponentWithOwner(owner) {}
void Tick(float);
};
struct CameraEntity : public RavEngine::GameObject {
Expand Down
4 changes: 2 additions & 2 deletions Samples/Animation/Character.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct CharacterScript : public RavEngine::ComponentWithOwner {

int16_t groundCounter = 0;

CharacterScript(entity_t owner, decltype(animator) a, decltype(rigidBody) r) : animator(a), rigidBody(r), ComponentWithOwner(owner) {}
CharacterScript(RavEngine::Entity owner, decltype(animator) a, decltype(rigidBody) r) : animator(a), rigidBody(r), ComponentWithOwner(owner) {}

bool OnGround() const;

Expand Down Expand Up @@ -71,4 +71,4 @@ struct Character : public RavEngine::GameObject {

struct CharacterScriptRunner : public RavEngine::AutoCTTI {
void operator()(CharacterScript&);
};
};
2 changes: 1 addition & 1 deletion Samples/Navigation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct Level : public World{

void DisplayNavPathWithDottedLine(){
struct DottedLineMarker : RavEngine::ComponentWithOwner{
DottedLineMarker(entity_t owner) : ComponentWithOwner(owner){}
DottedLineMarker(RavEngine::Entity owner) : ComponentWithOwner(owner){}
};
// delete all the previous dots
if (auto allDots = GetAllComponentsOfType<DottedLineMarker>()){
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Draw/Camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

struct Player : public RavEngine::ComponentWithOwner {

Player(entity_t owner) : ComponentWithOwner(owner){}
Player(RavEngine::Entity owner) : ComponentWithOwner(owner){}

float zoomspeed = 1;

Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_DrawAnimated/Camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

struct Player : public RavEngine::ComponentWithOwner{

Player(entity_t owner) : ComponentWithOwner(owner){}
Player(RavEngine::Entity owner) : ComponentWithOwner(owner){}
float zoomspeed = 1;

float fpsScale = 0;
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Lighting/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct SpinSystem : public RavEngine::AutoCTTI {
};

struct ObjectMarker : public ComponentWithOwner {
ObjectMarker(entity_t owner) : ComponentWithOwner(owner){}
ObjectMarker(RavEngine::Entity owner) : ComponentWithOwner(owner){}
};

struct StaticMeshEntity : public GameObject {
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Network/Level.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct Level : public RavEngine::World {

struct RelayComp : public RavEngine::ComponentWithOwner, public RavEngine::Queryable<RelayComp> {
void RequestSpawnObject(RavEngine::RPCMsgUnpacker& upk, HSteamNetConnection origin);
RelayComp(entity_t owner) : ComponentWithOwner(owner){}
RelayComp(RavEngine::Entity owner) : ComponentWithOwner(owner){}
};

enum ManagerRPCs {
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Network/NetTransform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct InterpolationTransform : public RavEngine::AutoCTTI {
};

struct NetTransform : public RavEngine::ComponentWithOwner {
NetTransform(entity_t owner) : ComponentWithOwner(owner){}
NetTransform(RavEngine::Entity owner) : ComponentWithOwner(owner){}
void UpdateTransform(RavEngine::RPCMsgUnpacker& upk, HSteamNetConnection origin);
};

Expand Down
2 changes: 1 addition & 1 deletion Samples/Playground/PlayerActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PlayerActor;
struct PlayerScript : public RavEngine::ScriptComponent, public RavEngine::IInputListener, public RavEngine::Queryable<PlayerScript,RavEngine::ScriptComponent> {
using Queryable<PlayerScript, RavEngine::ScriptComponent>::GetQueryTypes;

PlayerScript(entity_t owner) : ScriptComponent(owner){}
PlayerScript(RavEngine::Entity owner) : ScriptComponent(owner){}

RavEngine::Entity cameraEntity;
decimalType dt = 0;
Expand Down
2 changes: 1 addition & 1 deletion Samples/Playground/TestEntity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

struct TestEntityController : public RavEngine::ScriptComponent, public RavEngine::Queryable<TestEntityController, RavEngine::ScriptComponent> {
using RavEngine::Queryable<TestEntityController, RavEngine::ScriptComponent>::GetQueryTypes;
TestEntityController(entity_t owner) : ScriptComponent(owner) {}
TestEntityController(RavEngine::Entity owner) : ScriptComponent(owner) {}
void Tick(float scale) override;

void OnColliderEnter(RavEngine::PhysicsBodyComponent&, const RavEngine::ContactPairPoint* contactPoints, size_t numContactPoints) {
Expand Down
2 changes: 1 addition & 1 deletion Samples/Rats/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct RatComponent : public ComponentWithOwner{
double lastSoundTime = 0;
double lastLaunchTime = 0;
bool didTouchdown = false;
RatComponent(entity_t owner) : ComponentWithOwner(owner){}
RatComponent(RavEngine::Entity owner) : ComponentWithOwner(owner){}
};

struct Rat : public RavEngine::GameObject {
Expand Down
2 changes: 1 addition & 1 deletion Samples/SoundDynamics/Player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct PlayerController : public RavEngine::ScriptComponent {
void Tick(float scale) final {
scaleFactor = scale;
}
PlayerController(entity_t owner) : ScriptComponent(owner){}
PlayerController(RavEngine::Entity owner) : ScriptComponent(owner){}
};
struct Player : public RavEngine::GameObject {
void Create();
Expand Down

0 comments on commit 342a1d7

Please sign in to comment.