re-dump
- object class removed + added some helper functions
This commit is contained in:
349084
appdata/il2cpp-functions.h
349084
appdata/il2cpp-functions.h
File diff suppressed because it is too large
Load Diff
19
lib/ClientHelper.cpp
Normal file
19
lib/ClientHelper.cpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "ClientHelper.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
bool IsSinglePlayer()
|
||||||
|
{
|
||||||
|
return app::BoltNetwork_get_IsSinglePlayer(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsOnline()
|
||||||
|
{
|
||||||
|
return not app::BoltNetwork_get_IsSinglePlayer(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsHost()
|
||||||
|
{
|
||||||
|
return app::BoltNetwork_get_IsServer(NULL);
|
||||||
|
}
|
||||||
5
lib/ClientHelper.h
Normal file
5
lib/ClientHelper.h
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
bool IsSinglePlayer();
|
||||||
|
bool IsOnline();
|
||||||
|
bool IsHost();
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#include "pch-il2cpp.h"
|
|
||||||
|
|
||||||
#include "object.h"
|
|
||||||
#include "helpers.h"
|
|
||||||
|
|
||||||
app::GameObject* GameObject::FindWithTag(const char* tag)
|
|
||||||
{
|
|
||||||
Il2CppString* newStr = il2cpp_string_new(tag);
|
|
||||||
app::String* convert_to_appString = reinterpret_cast<app::String*>(newStr);
|
|
||||||
|
|
||||||
if (app::GameObject_FindWithTag(convert_to_appString, nullptr)) {
|
|
||||||
return app::GameObject_FindWithTag(convert_to_appString, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
inline T* GameObject::GetComponent()
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
16
lib/object.h
16
lib/object.h
@@ -1,16 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GameObject {
|
|
||||||
public:
|
|
||||||
GameObject() = default;
|
|
||||||
|
|
||||||
app::GameObject* FindWithTag(const char* tag);
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
T* GetComponent();
|
|
||||||
private:
|
|
||||||
app::GameObject* _currentGameObject = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user