This repository has been archived on 2024-10-18. You can view files and clone it, but cannot push or open issues or pull requests.
SymbolEngine__archived_repo.../Source/gdexample.cpp
Ed94 96dad8a849 following tut, bs happend.
gdnative decided to hardcode the directories of is includes to godot_cpp for the directory of the fucking git repo.
2022-05-12 08:18:55 -04:00

37 lines
503 B
C++

#include "gdexample.h"
namespace godot {
#pragma region GodotRT
void GDExample::_register_methods()
{
register_method("_process", &GDExample::_process);
}
void GDExample::_init()
{
time_passed = 0.f;
}
void GDExample::_process(float delta)
{
time_passed += delta;
Vector2
newPos = Vector2(
10.0 + (10.0 * sin(time_passed * 2.0)),
10.0 + (10.0 * cos(time_passed * 1.5))
);
set_position(newPos);
}
#pragma endregion GodotRT
GDExample::GDExample()
{}
GDExample::~GDExample()
{}
}