mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
Update Custom Modules Latest to include header and class name changes. (#5205)
This commit is contained in:
@@ -26,10 +26,10 @@ Next, you will create a header file with a TTS class:
|
||||
#ifndef GODOT_TTS_H
|
||||
#define GODOT_TTS_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/object/ref_counted.h"
|
||||
|
||||
class TTS : public Reference {
|
||||
GDCLASS(TTS, Reference);
|
||||
class TTS : public RefCounted {
|
||||
GDCLASS(TTS, RefCounted);
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
@@ -95,7 +95,7 @@ These files should contain the following:
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/class_db.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "tts.h"
|
||||
|
||||
void register_tts_types() {
|
||||
|
||||
@@ -43,13 +43,13 @@ an initialization state and a cleanup procedure.
|
||||
#ifndef HILBERT_HOTEL_H
|
||||
#define HILBERT_HOTEL_H
|
||||
|
||||
#include "core/list.h"
|
||||
#include "core/object.h"
|
||||
#include "core/object/object.h"
|
||||
#include "core/os/thread.h"
|
||||
#include "core/os/mutex.h"
|
||||
#include "core/rid.h"
|
||||
#include "core/set.h"
|
||||
#include "core/variant.h"
|
||||
#include "core/templates/list.h"
|
||||
#include "core/templates/rid.h"
|
||||
#include "core/templates/set.h"
|
||||
#include "core/variant/variant.h"
|
||||
|
||||
class HilbertHotel : public Object {
|
||||
GDCLASS(HilbertHotel, Object);
|
||||
@@ -96,10 +96,8 @@ an initialization state and a cleanup procedure.
|
||||
|
||||
#include "hilbert_hotel.h"
|
||||
|
||||
#include "core/dictionary.h"
|
||||
#include "core/list.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/variant.h"
|
||||
|
||||
#include "prime_225.h"
|
||||
|
||||
@@ -240,8 +238,6 @@ an initialization state and a cleanup procedure.
|
||||
|
||||
/* prime_225.h */
|
||||
|
||||
#include "core/int_types.h"
|
||||
|
||||
const uint64_t PRIME[225] = {
|
||||
2,3,5,7,11,13,17,19,23,
|
||||
29,31,37,41,43,47,53,59,61,
|
||||
@@ -338,8 +334,8 @@ is used to register the dummy class in GDScript.
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/class_db.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/config/engine.h"
|
||||
|
||||
#include "hilbert_hotel.h"
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ Inside we will create a summator class:
|
||||
#ifndef SUMMATOR_H
|
||||
#define SUMMATOR_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/object/ref_counted.h"
|
||||
|
||||
class Summator : public Reference {
|
||||
GDCLASS(Summator, Reference);
|
||||
class Summator : public RefCounted {
|
||||
GDCLASS(Summator, RefCounted);
|
||||
|
||||
int count;
|
||||
|
||||
@@ -129,7 +129,7 @@ These files should contain the following:
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/class_db.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "summator.h"
|
||||
|
||||
void register_summator_types() {
|
||||
@@ -366,7 +366,7 @@ We now need to add this method to ``register_types`` header and source files:
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "core/class_db.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "summator.h"
|
||||
|
||||
void preregister_summator_types() {
|
||||
|
||||
Reference in New Issue
Block a user