Тёмный

Creating A Modular Interaction Component 

StayAtHomeDev
Подписаться 42 тыс.
Просмотров 4,6 тыс.
50% 1

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@Legit_SuperFall
@Legit_SuperFall 2 месяца назад
liking the recent focus on modularity makes it simple for things to just work
@stayathomedev
@stayathomedev 2 месяца назад
That's the plan moving forward 👍
@Ferns_Gaming
@Ferns_Gaming Месяц назад
For those writing in C#, make sure you use GodotObject as the interactCastResult variables type in order to access the HasUserSignal method. For another helpful tip, my ConnectParent() method looks like this: public void ConnectParent() { parent.AddUserSignal("focused"); parent.AddUserSignal("unfocused"); parent.AddUserSignal("interacted"); parent.Connect("focused", Callable.From(InRange)); parent.Connect("unfocused", Callable.From(Unfocused)); parent.Connect("interacted", Callable.From(OnInteracted)); }
@Mefrius
@Mefrius День назад
I have a problem with objects that gets destroyed after interaction. If i use queue_free, object is still cashed, context ui is still on screen and if i press interact again, game is crashed. Tried to clear cashed manually but i can't figure out how. Does anyone know how to do that?
@aranasaurus
@aranasaurus 2 месяца назад
Just making sure I understand correctly, you could have made the focus/unfocus prints happen in the component and just emitted the signal in the player controller right? The next episode will do the highlighting logic over there I'd assume? Otherwise what was the point of setting up those signals?
@stayathomedev
@stayathomedev 2 месяца назад
Yeah next episode is highlighting!
@NeonfireStudio
@NeonfireStudio 2 месяца назад
Nice ❤, in this series, you will create swimming?
@l3vi792
@l3vi792 2 месяца назад
Thanks, I was looking how to make something similar to UE interfaces, now I know
@prateekmalhotra8552
@prateekmalhotra8552 2 месяца назад
Hi. Cool video. I liked the theme you have applied to the engine. Which one is it?
@mrlucky974
@mrlucky974 2 месяца назад
passivestar's minimal godot theme!
@stayathomedev
@stayathomedev 2 месяца назад
That's the one
@Vaanaattori
@Vaanaattori 2 месяца назад
Isnt it easier to just do parent.connect("focused", in_range) instead of parent.connect("focused", Callable(Self, "in_range"))?
@stayathomedev
@stayathomedev 2 месяца назад
Both should work. Mine is just more explicit and I remember in the Godot docs something about it being preferred.
@Luijeee
@Luijeee 2 месяца назад
@@stayathomedev I would imagine passing `parent.connect("focused", in_range)` would be preferred over the "callable with string", guessing that it'd give the compiler more info as a function than a dynamic string. I'm not sure why but passing functions as strings feels wrong - any more info on this & where it says the preference in docs?
@tumbleweb
@tumbleweb 2 месяца назад
@@Luijeee​​You can also access another node's methods as if they were any other attribute. parent.focused.connect(in_range)
@tumbleweb
@tumbleweb 2 месяца назад
@@stayathomedevIt's more explicit but it can't be picked up by the interpreter. Callable casting with (object, string) is useful for trying to refer to a method that may not exist. In this case, you can call in_range (as a literal without quotes) to access the method as a callable directly. The engine can resolve the reference to the method in the text editor since its available in the same script, unlike casting which only shows an error at runtime if the method doesn't exist.
Далее
Setting Up Object Interaction In Godot
12:03
Просмотров 6 тыс.
Godot UI & Control Node Crash Course
20:11
Просмотров 5 тыс.
БЕЛКА РОЖАЕТ? #cat
00:21
Просмотров 519 тыс.
Writing My Own Database From Scratch
42:00
Просмотров 222 тыс.
COGITO Tutorial 1 - Scene Setup (Godot)
5:43
Просмотров 2,1 тыс.
Giving Personality to Procedural Animations using Math
15:30
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 712 тыс.
AI can't cross this line and we don't know why.
24:07
Просмотров 292 тыс.
5 Games Made in Godot To Inspire You
5:31
Просмотров 10 тыс.
The basics of game architecture
20:58
Просмотров 12 тыс.
13 ADDONS to SPEED UP your game creation in GODOT!
11:23