How to Create a Health Bar (Unity Tutorial | 2D Top Down Shooter)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 23

  • @NicAnimation
    @NicAnimation 8 หลายเดือนก่อน

    Do you have any idea to make OnDied() without the invoke, for me invoke seems disadvantages when you lost your script or etc and you have to manually set them back again

  • @aleksandraaleksandra7934
    @aleksandraaleksandra7934 ปีที่แล้ว +2

    It's funny : a few days ago I was doing a review of tutorials on this topic. I thought it's a pity you don't have such a tutorial, and today I get a notification about this video. The universe favors me!

    • @KetraGames
      @KetraGames  ปีที่แล้ว +1

      Great to hear, thanks 😊

  • @felipemeridareinaga
    @felipemeridareinaga 2 หลายเดือนก่อน

    if the player moves and i have a script that makes the camera follow the player, will the ui move with the camera?

  • @VodkaMan699
    @VodkaMan699 ปีที่แล้ว +1

    Amazing ketra but I have on question how can we make the health bar smoother?

    • @KetraGames
      @KetraGames  ปีที่แล้ว +1

      Hi @VodkaMan, exactly as @visitor_t suggested. Instead of changing the FillAmount immediately you could store the current FillAmount and the target FillAmount. Then you could add an Update method and use Lerp or MoveTowards to gradually change the value from the current FillAmount to the desired FillAmount. Hope that helps 😊

  • @blueytg6026
    @blueytg6026 ปีที่แล้ว

    I can't find the square sprite anywhere, even after toggling the packages visibility icon. How do I get it?

    • @DemonMachine12
      @DemonMachine12 10 หลายเดือนก่อน

      when making the project, you need to select URP2D instead of 2D

    • @brayneldelrio7044
      @brayneldelrio7044 9 หลายเดือนก่อน

      @@DemonMachine12 dang that duded messed up bad

    • @DemonMachine12
      @DemonMachine12 8 หลายเดือนก่อน

      your right to be honest@@brayneldelrio7044

  • @mrgoodkat1135
    @mrgoodkat1135 ปีที่แล้ว

    Greetings! Thanks for the cool lessons! I came across such an error - when a player dies, the health bar does not decrease completely, the fill amount parameter in the inspector remains at 0.1. Tell me how can I fix it?

    • @DemonMachine12
      @DemonMachine12 10 หลายเดือนก่อน +1

      update the health bar on death

  • @30fpsprohere
    @30fpsprohere ปีที่แล้ว

    Can we add animations in health Bar and how

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Hi, you could use Lerp or MoveTowards to smoothly move the health bar. Hope that helps 😊

  • @George-uv7wt
    @George-uv7wt ปีที่แล้ว +2

    ty

  • @ismaileyupozgen4940
    @ismaileyupozgen4940 ปีที่แล้ว

    Nice tutorials thank you guys so much and when will you uploud the new video?

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Thanks. New video coming in the next few days 😊

  • @W5AKC
    @W5AKC ปีที่แล้ว

    Nice tutorials!!! Many thanks!! I do have a question though...how would you do this with C# event Action instead of UnityEvent? I do not like setting events in the editor. I did code only for other events, but the UI update is confusing on where this could be done. Thanks!

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Thanks 😊
      You could add the HealthController as a SerializeField on the UI script. Then you could subscribe to the event in the Start method. Hope that helps 😊

  • @jasonwilliams8730
    @jasonwilliams8730 ปีที่แล้ว +2

    👍

  • @azropearce7566
    @azropearce7566 6 หลายเดือนก่อน

    u sooooo amazing!!!! it is totally true! I love u so much. THX! H&K