Godot Signals - C#

Поделиться
HTML-код
  • Опубликовано: 10 ноя 2024

Комментарии • 34

  • @aphemra6431
    @aphemra6431 5 месяцев назад +2

    You know, I have a degree in game programming and a good amount of experience in Unity, Unreal, and now diving into Godot.
    And events/signals have always been something I personally took a long time to wrap my head around. But man, if a professor would have explained them like this back in school, I probably would have had a much easier time. Lmao.

  • @quentinediting
    @quentinediting 3 месяца назад +2

    Honestly if it wasn't for your videos I would've given up on Godot forever ago. THANK YOU!
    You are like the only person on RUclips doing Godot C# tutorials

    • @arkadegamesllc
      @arkadegamesllc  3 месяца назад +3

      I'm super happy to be of service! I'll keep pumping them out for you, and hopefully, the Godot C# community will start to grow so you won't only have to listen to me drone on and on :D

  • @kauuanxD
    @kauuanxD Месяц назад

    This process is very unclear in the docs
    it's very helpful, thanks!

  • @moroastray
    @moroastray 2 месяца назад

    You have a real talent for teaching, this was excellent thank you

  • @grzegorzpedrycz2630
    @grzegorzpedrycz2630 2 месяца назад

    Your stuff is just pure gold man !

  • @JustifiedSoftworks
    @JustifiedSoftworks Месяц назад

    Excellent video, you have a good teaching style.

  • @bombrman1994
    @bombrman1994 5 месяцев назад

    I like it how you have a drawing on the whiteboard on each frame and video, love your efforts

    • @arkadegamesllc
      @arkadegamesllc  4 месяца назад

      Thank you! I love to add the touches when I have time :D

  • @Ver2ion
    @Ver2ion 3 месяца назад

    this helped me so much wow i was so stuck all day trying to send the fruit count from my player to a gui element lol

    • @arkadegamesllc
      @arkadegamesllc  3 месяца назад

      Yay! I always love hearing about helping folks. Good luck on your game!

  • @HansenMalte
    @HansenMalte Месяц назад

    That video is fucking awesome

  • @imbafrog
    @imbafrog 5 месяцев назад

    Your videos are a god-send. I love every single one. Keep up the great job.

    • @arkadegamesllc
      @arkadegamesllc  4 месяца назад +1

      Will do! Got another uploading for you right now.

  • @szu7422
    @szu7422 5 месяцев назад

    You explain things very clearly and with examples, I appreciate it

  • @Red5nake
    @Red5nake 4 месяца назад +1

    Best signals guide for godot C# i've seen so far. Thank you!

    • @arkadegamesllc
      @arkadegamesllc  4 месяца назад

      You're very welcome. Just put one up on events for you, if you're interested.

  • @janjoniec1693
    @janjoniec1693 2 месяца назад

    really good video!

  • @alapidis
    @alapidis 5 месяцев назад

    I love how simple and straight forward you present this. I've seen so many videos when I was learning about events back in the day that got into the weeds rather then showing simple use case examples first to get people comfortable with it. Because of that events were this confusing black box for way too long for me. I wish I had seen a video like this on events back then. Great job!

    • @arkadegamesllc
      @arkadegamesllc  5 месяцев назад

      Thank you @alapidis, I appreciate the kind words!

  • @joskyjosh9575
    @joskyjosh9575 Месяц назад

    Thanks bro🎉

  • @calmceachern
    @calmceachern 5 месяцев назад

    Great stuff! Keep it up!

  • @patch2792
    @patch2792 5 месяцев назад

    I was looking forward to this video, it helped so much, thank you! I'm not 100% there on how the syntax is working with how you've explained the delegated functions though. In the context of the timer code you made at 12:00, is _timer.Timeout accessing a list of methods in the _timer object then, and adding to that?

    • @arkadegamesllc
      @arkadegamesllc  5 месяцев назад +1

      You are correct. Timeout is the name of a delegate in the Timer.cs class. So when you do something like "_timer.Timeout += OnTimerTimeoutSignal;", you're adding the OnTimerTimeoutSignal method to the delegate Timeout which lives on the specific _timer. Then when the timer hits zero, it emits Timeout, which is the same as saying "all of the methods added to Timeout get called."

  • @stevendorries
    @stevendorries 5 месяцев назад

    I suspect that emitting a Godot signal involves a P/Invoke behind the scenes, is that correct to your knowledge?

    • @arkadegamesllc
      @arkadegamesllc  4 месяца назад +1

      To my knowledge, yes. Signals are built on top of C#'s already existing event system, so for responding intra-language, I'd assume it's an Invoke call behind the scenes.

  • @michaelkimball3401
    @michaelkimball3401 5 месяцев назад

    Is there a way to use C# events and have them show up in the Godot UI?

    • @arkadegamesllc
      @arkadegamesllc  5 месяцев назад

      C# events are not serializable to the best of my knowledge. The only reason custom signals show up in the UI is because of Godot voodoo (one of the reasons you have to add "EventHandler" to the end). Other than showing up in a list in the Node tab, I can't think of how having them showing up in the UI would be useful though.

    • @stevendorries
      @stevendorries 5 месяцев назад

      @@arkadegamesllcever created custom windows.forms controls for use with the VS designer? Similar voodoo

  • @Frazer213
    @Frazer213 5 месяцев назад

    northBox.BodyEntered += OnNorthBoxBodyEntered;
    northBox.BodyExited += OnBodyExited;
    how you said i should do it vs how i was doing
    southBox.Connect("body_entered", new Callable(this, nameof(OnSouthBoxBodyEntered)));
    southBox.Connect("body_exited", new Callable(this, nameof(OnBodyExited)));
    pretty wild one is alot easier to use yet the docs tell us to do it another way. Ill be looking forward on your Events video.

  • @Frazer213
    @Frazer213 5 месяцев назад

    does this work in scripts where the thing you wanna emit is a child of the node? For example i have a tranisiton scene, that has a child animationplayer, im trying to emit a signal when the animation finished playing. In the ready of the transition scene i cannot do

    private AnimationPlayer animationPlayer;
    public override void _Ready()
    {
    animationPlayer = GetNode("AnimationPlayer");
    animationPlayer.AnimationFinished += OnAnimationFinish;
    } i get an error stating no overload for OnAnimationfinish(string) matches delegate AnimationMixer.animationfinishedeventhandler.
    im forced to do animationPlayer.Connect("animation_finished", new Callable(this, nameof(OnAnimationFinish)));

    • @arkadegamesllc
      @arkadegamesllc  4 месяца назад +1

      Sorry I'm getting to this late - had work stuff to handle this week.
      Your OnAnimationFinish signal handler needs to take a StringName as a parameter, not a String. So if you make your method signature look like this -
      private void OnAnimationFinish(StringName animName)
      Then it looks like your code would be fine.