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

40 lines
492 B
C++
Raw Normal View History

#include "gdexample.h"
namespace godot {
2022-05-12 09:57:00 -07:00
#pragma region GodotRT
2022-05-12 09:57:00 -07:00
void GDExample::_bind_methods()
{
}
2022-05-12 09:57:00 -07:00
// void GDExample::_init()
// {
// time_passed = 0.f;
// }
2022-05-12 09:57:00 -07:00
void GDExample::_process(double 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()
2022-05-12 09:57:00 -07:00
{
time_passed = 0.f;
}
GDExample::~GDExample()
{}
2022-05-12 09:57:00 -07:00
} // godot