GalaxyScript is a powerful scripting library designed for C++ development, particularly for game development. It provides an intuitive and efficient way to script functionality in your C++ projects. Whether you are creating games or simulations, GalaxyScript aims to streamline the scripting process, making it accessible and flexible.
-
Clone the GalaxyScript repository.
git clone https://github.com/your_username/GalaxyScript.git
-
Build the library using xmake base on your config e.g for windows with msvc :
xmake f -p [macosx|linux|iphoneos ..] -a [x86_64|i386|arm64 ..] -m [debug|release] xmake
#include <set>
#include <iostream>
#include <vector>
#include "Macro.h"
#include "ScriptComponent.h"
#include "ExampleClass.generated.h"
CLASS()
class ExampleClass : public ScriptComponent
{
GENERATED_BODY()
public:
ExampleClass();
PROPERTY();
int valueI = 0;
PROPERTY(HideInInspector, DisplayName = "Aled");
double valueD = 0.0;
PROPERTY();
ExampleClass* valueC;
PROPERTY();
class ABCD* value2;
PROPERTY();
std::vector<int> value3;
public:
FUNCTION();
void Method()
{
std::cout << "Method from ExampleClass" << std::endl;
}
};
END_CLASS()
CLASS()
class AnotherClass : public ExampleClass
{
GENERATED_BODY()
public:
AnotherClass();
PROPERTY();
int value = 0;
public:
FUNCTION();
void Method()
{
std::cout << "Method from AnotherClass" << std::endl;
}
};
END_CLASS()
END_FILE()
Detailed documentation, including examples and API references, can be found on the GalaxyScript Wiki.
This project is licensed under the MIT License.