generated from Persson-dev/Godot-Xmake
remove gdexample
This commit is contained in:
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
#include "gdexample.h"
|
|
||||||
#include <godot_cpp/core/class_db.hpp>
|
|
||||||
|
|
||||||
using namespace godot;
|
|
||||||
|
|
||||||
void GDExample::_bind_methods() {
|
|
||||||
// ClassDB::bind_method(D_METHOD("_process", "delta"), &GDExample::_process);
|
|
||||||
}
|
|
||||||
|
|
||||||
GDExample::GDExample()
|
|
||||||
{
|
|
||||||
time_passed = 0.0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
GDExample::~GDExample() {}
|
|
||||||
|
|
||||||
void GDExample::_process(float delta)
|
|
||||||
{
|
|
||||||
time_passed += delta;
|
|
||||||
|
|
||||||
auto new_position = Vector2(
|
|
||||||
10.0 + (10.0 * sin(time_passed * 2.0)),
|
|
||||||
10.0 + (10.0 * cos(time_passed * 1.5)));
|
|
||||||
|
|
||||||
set_position(new_position);
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#ifndef GDEXAMPLE_H
|
|
||||||
#define GDEXAMPLE_H
|
|
||||||
|
|
||||||
#include <godot_cpp/classes/sprite2d.hpp>
|
|
||||||
|
|
||||||
namespace godot
|
|
||||||
{
|
|
||||||
class GDExample : public Sprite2D
|
|
||||||
{
|
|
||||||
GDCLASS(GDExample, Sprite2D)
|
|
||||||
private:
|
|
||||||
double time_passed;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static void _bind_methods();
|
|
||||||
|
|
||||||
public:
|
|
||||||
GDExample();
|
|
||||||
~GDExample();
|
|
||||||
|
|
||||||
void _process(float delta);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user