-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
109 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ namespace SoT | |
|
||
SotCore(); | ||
bool Prepare(); | ||
UE4Actor^ GetLocalPlayer(); | ||
array<UE4Actor^>^ GetActors(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
#include "pch.h" | ||
#include "Core.h" | ||
#include "UE4ActorWrapper.h" | ||
#include <msclr\marshal_cppstd.h> | ||
using namespace msclr::interop; | ||
|
||
namespace SoT | ||
{ | ||
|
||
std::string ToUnmanagedString(String^ stringIncoming) | ||
{ | ||
std::string unmanagedString = marshal_as<std::string>(stringIncoming); | ||
return unmanagedString; | ||
} | ||
|
||
bool UE4Actor::isValid() | ||
{ | ||
AActor actor = Core::SotCore::singleton->TempActors[(int)this->IDActors]; | ||
std::string test = Core::SotCore::singleton->getNameFromIDmem(actor.GetID()); | ||
std::string standardString = ToUnmanagedString(this->BaseName); | ||
return test.compare(standardString) == 0; | ||
} | ||
|
||
VectorUE4^ UE4Actor::getPos() | ||
{ | ||
if (isValid()) | ||
{ | ||
AActor actor = Core::SotCore::singleton->TempActors[(int)this->IDActors]; | ||
return gcnew VectorUE4(actor.GetRootComponent().GetPosition()); | ||
} | ||
} | ||
|
||
System::String^ UE4Actor::getName() | ||
{ | ||
if (isValid()) | ||
{ | ||
AActor actor = Core::SotCore::singleton->TempActors[(int)this->IDActors]; | ||
std::string test = Core::SotCore::singleton->getNameFromIDmem(actor.GetID()); | ||
return gcnew System::String(test.c_str()); | ||
} | ||
return gcnew System::String("NonePasCool"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
#include "pch.h" | ||
#include "VectorUE4.h" | ||
namespace Core | ||
namespace SoT | ||
{ | ||
int x = 0; | ||
int y = 0; | ||
int z = 0; | ||
VectorUE4::VectorUE4(Vector3 vec) : ManagedObject(&vec) | ||
{ | ||
|
||
} | ||
|
||
float VectorUE4::getX() | ||
{ | ||
return this->m_Instance->x; | ||
} | ||
|
||
float VectorUE4::getY() | ||
{ | ||
return this->m_Instance->y; | ||
} | ||
|
||
float VectorUE4::getZ() | ||
{ | ||
return this->m_Instance->z; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
#pragma once | ||
#include "pch.h" | ||
#include "ManagedObject.h" | ||
#include "vector.h" | ||
namespace SoT | ||
{ | ||
public ref class VectorUE4 | ||
public ref class VectorUE4 : public ManagedObject<Vector3> | ||
{ | ||
public: | ||
float x; | ||
float y; | ||
float z; | ||
VectorUE4(Vector3 vec); | ||
float getX(); | ||
float getY(); | ||
float getZ(); | ||
|
||
}; | ||
} |