Reorganized UnityEngine namespace
Reorganized UnityEngine namespace by splitting headers into individual classes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include "ClientHelper.h"
|
||||
#include "UnityEngine.h"
|
||||
#include "UnityEngine/Engine.hpp"
|
||||
#include "players/players.h"
|
||||
#include "helpers.h"
|
||||
#include "esp.hpp"
|
||||
@@ -31,11 +31,11 @@ static void DrawBoxESP(app::GameObject *it, float footOffset, float headOffset,
|
||||
if (!it || cam == nullptr)
|
||||
return;
|
||||
|
||||
app::Transform* _transform = UnityEngine::Transform::Get(it);
|
||||
app::Transform* _transform = Transform::Get(it);
|
||||
if (_transform == nullptr)
|
||||
return;
|
||||
|
||||
app::Vector3 pos = UnityEngine::Transform::Position(_transform);
|
||||
app::Vector3 pos = Transform::Position(_transform);
|
||||
|
||||
app::Vector3 footpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + footOffset, pos.z}, NULL);
|
||||
app::Vector3 headpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + headOffset, pos.z}, NULL);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "ClientHelper.h"
|
||||
#include "players/players.h"
|
||||
#include "helpers.h"
|
||||
#include "UnityEngine.h"
|
||||
#include "UnityEngine/Engine.hpp"
|
||||
#include <iostream>
|
||||
#include "Windows.h"
|
||||
#include <map>
|
||||
@@ -16,7 +16,7 @@ void Misc::ForceStart()
|
||||
std::string _scene = SceneName();
|
||||
|
||||
if (IsHost() && _scene == std::string("Menu")) {
|
||||
app::Menu* _menu = UnityEngine::Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||
app::Menu* _menu = Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||
|
||||
if (_menu) {
|
||||
if (app::Menu_OnLobbyStartButtonClick) {
|
||||
@@ -99,7 +99,7 @@ void Misc::InstantWin()
|
||||
int32_t progress = 10;
|
||||
|
||||
if (_scene == std::string("Inn")) {
|
||||
app::MapController* _MapController = UnityEngine::Object::FindObjectOfType<app::MapController>("MapController");
|
||||
app::MapController* _MapController = Object::FindObjectOfType<app::MapController>("MapController");
|
||||
|
||||
if (_MapController) {
|
||||
|
||||
@@ -111,7 +111,7 @@ void Misc::InstantWin()
|
||||
}
|
||||
}
|
||||
else if (_scene == std::string("Slaughterhouse")) {
|
||||
app::SlaughterhouseAltarController* _SlaughterhouseAltarController = UnityEngine::Object::FindObjectOfType<app::SlaughterhouseAltarController>("SlaughterhouseAltarController");
|
||||
app::SlaughterhouseAltarController* _SlaughterhouseAltarController = Object::FindObjectOfType<app::SlaughterhouseAltarController>("SlaughterhouseAltarController");
|
||||
|
||||
if (_SlaughterhouseAltarController) {
|
||||
|
||||
@@ -124,7 +124,7 @@ void Misc::InstantWin()
|
||||
}
|
||||
else {
|
||||
//app::SurvivalObjectBurnController* _SurvivalObjectBurnController = UnityEngine::Object::FindObjectOfType("SurvivalObjectBurnController");
|
||||
app::SurvivalObjectBurnController* _SurvivalObjectBurnController = UnityEngine::Object::FindObjectOfType<app::SurvivalObjectBurnController>("SurvivalObjectBurnController");
|
||||
app::SurvivalObjectBurnController* _SurvivalObjectBurnController = Object::FindObjectOfType<app::SurvivalObjectBurnController>("SurvivalObjectBurnController");
|
||||
|
||||
if (_SurvivalObjectBurnController) {
|
||||
// DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));
|
||||
@@ -174,10 +174,10 @@ void Misc::SpawnPrefab(const char* prefabName) {
|
||||
if (localPlayer) {
|
||||
app::Quaternion rotation = app::Quaternion_get_identity(NULL);
|
||||
|
||||
app::Transform* playerTransform = UnityEngine::Transform::Get(localPlayer);
|
||||
app::Transform* playerTransform = Transform::Get(localPlayer);
|
||||
if (playerTransform == nullptr) return;
|
||||
|
||||
app::Vector3 playerPos = UnityEngine::Transform::Position(playerTransform);
|
||||
app::Vector3 playerPos = Transform::Position(playerTransform);
|
||||
|
||||
if (app::BoltNetwork_Instantiate_6) {
|
||||
app::GameObject* go = (app::GameObject*)app::BoltNetwork_Instantiate_6(p, playerPos, rotation, nullptr);
|
||||
@@ -194,7 +194,7 @@ void Misc::RankSpoofer(int value) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
app::NolanRankController* rankController = UnityEngine::Object::FindObjectOfType<app::NolanRankController>("NolanRankController");
|
||||
app::NolanRankController* rankController = Object::FindObjectOfType<app::NolanRankController>("NolanRankController");
|
||||
|
||||
if (rankController != nullptr) {
|
||||
if (app::NolanRankController_SetRank != nullptr) {
|
||||
@@ -227,7 +227,7 @@ void Misc::Revive(bool self)
|
||||
}
|
||||
|
||||
// app::SurvivalReviveInteractable
|
||||
app::SurvivalReviveInteractable* revive = UnityEngine::Object::FindObjectOfType<app::SurvivalReviveInteractable>("SurvivalReviveInteractable");
|
||||
app::SurvivalReviveInteractable* revive = Object::FindObjectOfType<app::SurvivalReviveInteractable>("SurvivalReviveInteractable");
|
||||
|
||||
if (revive == NULL) {
|
||||
if (self) {
|
||||
@@ -288,10 +288,10 @@ void Misc::Jumpscare() {
|
||||
return;
|
||||
}
|
||||
|
||||
app::Survival* survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
||||
app::Survival* survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||
if (survival == NULL) { return; }
|
||||
|
||||
app::SurvivalAzazelBehaviour* azazel = UnityEngine::Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||
app::SurvivalAzazelBehaviour* azazel = Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||
|
||||
app::GameObject* ai = GetAzazel(survival);
|
||||
|
||||
@@ -305,7 +305,7 @@ void Misc::Jumpscare() {
|
||||
|
||||
if (currentPlayer == NULL) continue;
|
||||
|
||||
app::Component* component = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
app::Component* component = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
|
||||
if (component != NULL) {
|
||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
||||
@@ -333,10 +333,10 @@ void Misc::Kill(bool self) {
|
||||
return;
|
||||
}
|
||||
|
||||
app::Survival* survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
||||
app::Survival* survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||
if (survival == NULL) { return; }
|
||||
|
||||
app::SurvivalAzazelBehaviour* azazel = UnityEngine::Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||
app::SurvivalAzazelBehaviour* azazel = Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||
|
||||
app::GameObject* ai = GetAzazel(survival);
|
||||
|
||||
@@ -361,7 +361,7 @@ void Misc::Kill(bool self) {
|
||||
|
||||
if (currentPlayer == NULL) continue;
|
||||
|
||||
app::Component* component = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
app::Component* component = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
|
||||
if (component != NULL) {
|
||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
||||
@@ -396,7 +396,7 @@ void Misc::TpToAzazel()
|
||||
if (nb == nullptr) return;
|
||||
|
||||
|
||||
app::Survival* _survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
||||
app::Survival* _survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||
if (_survival == nullptr) return;
|
||||
|
||||
// get azazel
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "helpers.h"
|
||||
|
||||
#include "players/players.h"
|
||||
#include "UnityEngine.h"
|
||||
#include "UnityEngine/Engine.hpp"
|
||||
#include "ClientHelper.h"
|
||||
#include "features/misc/misc.h"
|
||||
|
||||
@@ -92,7 +92,7 @@ void __stdcall hNolanBehaviour_Update(app::NolanBehaviour* __this, MethodInfo* m
|
||||
|
||||
if (transform) {
|
||||
|
||||
app::Vector3 pos = UnityEngine::Transform::Position(transform);
|
||||
app::Vector3 pos = Transform::Position(transform);
|
||||
|
||||
if (GetAsyncKeyState('W') & 0x8000) {
|
||||
pos = pos + (app::Transform_get_forward(transform, nullptr) * speed * Time_DeltaTime());
|
||||
@@ -116,10 +116,10 @@ void __stdcall hNolanBehaviour_Update(app::NolanBehaviour* __this, MethodInfo* m
|
||||
|
||||
app::GameObject* thisGameObject = app::Component_get_gameObject((app::Component*)__this, nullptr);
|
||||
|
||||
if (thisGameObject != nullptr || !IsNull((app::Object_1*)thisGameObject)) {
|
||||
app::Component* _UltimateCharacterLocomotion = UnityEngine::GameObject::GetComponentByName(thisGameObject, "UltimateCharacterLocomotion");
|
||||
if (thisGameObject != nullptr || !Object::IsNull((app::Object_1*)thisGameObject)) {
|
||||
app::Component* _UltimateCharacterLocomotion = GameObject::GetComponentByName(thisGameObject, "UltimateCharacterLocomotion");
|
||||
|
||||
if (_UltimateCharacterLocomotion != nullptr && !IsNull((app::Object_1*)_UltimateCharacterLocomotion)) {
|
||||
if (_UltimateCharacterLocomotion != nullptr && !Object::IsNull((app::Object_1*)_UltimateCharacterLocomotion)) {
|
||||
if (app::UltimateCharacterLocomotion_SetPosition_1) {
|
||||
app::UltimateCharacterLocomotion_SetPosition_1((app::UltimateCharacterLocomotion*)_UltimateCharacterLocomotion, pos, false, nullptr);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "Wrapper.h"
|
||||
#include "ClientHelper.h"
|
||||
#include "hooks/hooks.hpp"
|
||||
#include "UnityEngine.h"
|
||||
#include "UnityEngine/Engine.hpp"
|
||||
#include "color.hpp"
|
||||
#include "features/misc/misc.h"
|
||||
#include "utils/utils.hpp"
|
||||
@@ -127,7 +127,7 @@ void Run()
|
||||
std::string scene = SceneName();
|
||||
|
||||
if (scene == std::string("Menu")) {
|
||||
app::Menu* horrorMenu = UnityEngine::Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||
app::Menu* horrorMenu = Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||
|
||||
if (!horrorMenu)
|
||||
return;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
#include "players.h"
|
||||
#include <helpers.h>
|
||||
#include "UnityEngine.h"
|
||||
#include "UnityEngine/Engine.hpp"
|
||||
#include "ClientHelper.h"
|
||||
|
||||
app::GameObject__Array* Players::GetAllPlayers()
|
||||
{
|
||||
app::GameObject__Array* players = UnityEngine::Object::FindGameObjectsWithTag("Player");
|
||||
app::GameObject__Array* players = Object::FindGameObjectsWithTag("Player");
|
||||
|
||||
return players ? players : nullptr;
|
||||
}
|
||||
@@ -18,7 +18,7 @@ app::GameObject* Player::GetLocalPlayer()
|
||||
|
||||
if (cachedLocalPlayer != nullptr) {
|
||||
// Check if cached player is still valid
|
||||
if (IsNull((app::Object_1*)cachedLocalPlayer)) {
|
||||
if (Object::IsNull((app::Object_1*)cachedLocalPlayer)) {
|
||||
cachedLocalPlayer = nullptr;
|
||||
}
|
||||
else {
|
||||
@@ -35,11 +35,11 @@ app::GameObject* Player::GetLocalPlayer()
|
||||
for (int i = 0; i < _size; i++) {
|
||||
app::GameObject* currentPlayer = playerList->vector[i];
|
||||
|
||||
if (IsNull((app::Object_1*)currentPlayer)) {
|
||||
if (Object::IsNull((app::Object_1*)currentPlayer)) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
app::Component* nbComponent = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
app::Component* nbComponent = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||
|
||||
if (nbComponent) {
|
||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(nbComponent);
|
||||
@@ -64,7 +64,7 @@ app::NolanBehaviour* Player::GetNolan()
|
||||
|
||||
if (lastLocalPlayer != localPlayer) {
|
||||
|
||||
app::Component* nbComponent = UnityEngine::GameObject::GetComponentByName(localPlayer, "NolanBehaviour");
|
||||
app::Component* nbComponent = GameObject::GetComponentByName(localPlayer, "NolanBehaviour");
|
||||
|
||||
if (nbComponent) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user