filmov
tv
Using Enums in GDScript for Better Code in Godot 4

Показать описание
Enums in GDScript are a great way to manage state and limited options for variables. This video goes over how to define them, use them, and work with them in the Inspector in Godot 4. The concept is illustrated by adding a fire state to a play that handles firing one bullet or two. An anti-example is provided, then the code is refactored to show the value of enums.
Godot version used: 4.0
Chapters
00:00 - Intro
02:24 - Counter-Example Using a String Variable
05:50 - Refactor to Using an Enum
11:10 - Referencing an Enum in Other Scripts
12:33 - Code Clean Up
14:16 - Easier Testing
15:14 - Outro
#Godot #Godot4 #GrowingWithGodot #GodotEngine
Godot version used: 4.0
Chapters
00:00 - Intro
02:24 - Counter-Example Using a String Variable
05:50 - Refactor to Using an Enum
11:10 - Referencing an Enum in Other Scripts
12:33 - Code Clean Up
14:16 - Easier Testing
15:14 - Outro
#Godot #Godot4 #GrowingWithGodot #GodotEngine
Using Enums in GDScript for Better Code in Godot 4
Enums | Godot GDScript Tutorial | Ep 11
Enums in GDScript | Godot Engine
How to Export Enums in #Godot! Tricks I Learned While Live
Learn GDScript with me: Enums
Enums in Godot (Introduction)
Enums in gdscript ✅| GDscript complete course (Beginner to Advanced) | Ep 12
How to Get a Random Variant of an Enum in GDScript for Godot 3.3
Enums in Godot - how to write better code with GDScript
What are Enums? (GDScript Basics)
GDSCRIPT en 5 minutos Enums Ep 9
Resources as an Enum Alternative [Bytesized Godot #7]
MYTH 1: Godot's GDScript & The Performance Argument
Enums (Enumerated Constants) With Dictionaries (Complete Course in Adventure Game Programming)
How to program in Godot - GDScript Tutorial
What’s Wrong With Most Godot Tutorials (including ours)
Tap Engine : GDScript - Enums
You're not using Godot to its potential
Coding Style Guide || Godot 4+ Tutorial || GDScript 2.0
TypeScript - What's An Enum?
How to Greatly Benefit From DICTIONARIES in Godot 4.4+
Classes as Data Types | Godot GDScript Tutorial | Ep 18
8 changes to GDScript in Godot 4 you'll want to know about
10. Enum and Match
Комментарии