This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var db_ref | |
| func _ready() -> void: | |
| Firebase.Auth.login_succeeded.connect(_on_FirebaseAuth_login_succeeded) | |
| Firebase.Auth.login_with_email_and_password(email, password) | |
| func _on_FirebaseAuth_login_succeeded(auth): | |
| db_ref = Firebase.Database.get_database_reference("config", {}) | |
| db_ref.new_data_update.connect(_on_db_data_update) | |
| db_ref.patch_data_update.connect(_on_db_data_update) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # meta-name: ClassNamed | |
| # meta-description: Auto-class_name anything | |
| class_name _CLASS_ | |
| extends _BASE_ | |
| # To use: in a Godot project, add a script_templates folder, add a sub-folder of it named Object, and copy/paste the above into a file named class_named.gd. | |
| # Then, when creating a new resource, have it inherit Resource in the editor for the new script creation, and tap on the checkbox next to template, and select the new ClassNamed template. When you give it a name for the .gd file, it'll put the name instead of _CLASS_. This works for any type you want to add. |
OlderNewer