How to use INHERITANCE (C#) to create more characters' behaviors in Unity

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

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

  • @subliminalcastillo2126
    @subliminalcastillo2126 4 ปีที่แล้ว +17

    Bruh. I came here to learn about inheritance & learned 50 other things I've been wanting to know too. You are the MAN!

    • @beaverjoe9171
      @beaverjoe9171  4 ปีที่แล้ว

      Chris Castillo thx 😊 Appreciate!!

  • @TwiejkVR
    @TwiejkVR 3 ปีที่แล้ว +17

    So happy i found this tutorial, finally someone who gives us practicle examples of this confusing topic.
    Well done man!

  • @denielldevries
    @denielldevries 3 ปีที่แล้ว +6

    This is the first tutorial or overview I've watched that actually makes sense. I was confused on where you would even put the Enemy script while the child class inherits from it and this explained that concept well. Thanks for the video!

  • @brandonlilly5738
    @brandonlilly5738 4 ปีที่แล้ว +15

    I’m going to rewatch this and take notes. This helped me so much. Thank you

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

      Thx for your comment. By the way My project's link is in the description below. (Also, I highly recommend you to watch this, very inspired as well: th-cam.com/video/ZpxNmDm-t64/w-d-xo.html)

  • @RetroGamesHQ
    @RetroGamesHQ 3 ปีที่แล้ว

    So many tutorials suck at showing how to properly use inheritance, so thank you making this simple and effective tutorial

  • @lorddorvazgon2077
    @lorddorvazgon2077 2 ปีที่แล้ว

    YOU
    ARE
    THE BEST
    INSTRUCTOR
    EVER!!

  • @rhgamedev355
    @rhgamedev355 4 ปีที่แล้ว +3

    It really baffles my that your channel isn't more popular. You put out some of the best unity tutorials on youtube!

    • @beaverjoe9171
      @beaverjoe9171  4 ปีที่แล้ว +3

      Thx😊😊 that’s my pleasure.

  • @TheKr0ckeR
    @TheKr0ckeR 3 ปีที่แล้ว

    I was here to practise inheritance and i learned to create full game. Especially the hp bar concept is the best!

  • @ihtasham9237
    @ihtasham9237 2 ปีที่แล้ว

    This was not only a good introduction to inheritance, it was also a good introduction to the Unity engine to someone who has had prior game dev experience

  • @jonatan.cirqueira3925
    @jonatan.cirqueira3925 3 ปีที่แล้ว

    I never understood why tutorials are not always like this, you show the problem appearing before teaching the solution, much more intuitive because that's what happen when we are really developing. I hope your gets more and more attention

  • @oscarlai9511
    @oscarlai9511 3 ปีที่แล้ว

    As a new developer, this has not only given the code but also explained it with images really really well. Thanks and keep up the work.

  • @moviedevil12
    @moviedevil12 2 ปีที่แล้ว

    WOW, amazing video! Very detailed and very clearly explained. This deserves a lot more views!

  • @DrewofDonuts
    @DrewofDonuts 3 ปีที่แล้ว

    I'm so confused why this doesn't have more views - this is so well done and helpful! Thank you so much (-:

  • @Kalrush_Random
    @Kalrush_Random 2 ปีที่แล้ว

    Listen!!! Great tutorial, I Love the art and the explanation, I understood almost everything by what you said & the example compared to other tutorials which were confusing and without examples, Thank you very much, Wish you the best!

  • @GobiPie
    @GobiPie 3 ปีที่แล้ว

    This tuto is really amazing, you put lot of efforts into making it clear and with nice tips along the way. Kinda sad you only have 5k sub, you deserve a lot more visibility for such a quality content!

  • @Jamesbass74
    @Jamesbass74 2 ปีที่แล้ว

    This guy is amazing! How have I never seen these?!

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

    This is such a good practical example, can't wait to try it out for my game

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

    It's criminal that this vid has such few views. It's amazing how much it helped me to practice inheritance.

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

    You are very nice!
    I love your tutorial. That so easy to understand. Have you great video come out. I can't wait to see it.

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

    What a gem of a video!

  • @THOMASXDXDXDXD
    @THOMASXDXDXDXD 2 ปีที่แล้ว

    Amazing tutorial! Thank you so much for this video, it really helped me a lot to understand how to integrate inheritance and other OOP concepts into Unity.

  • @benjaminhodges3589
    @benjaminhodges3589 3 ปีที่แล้ว

    Hey man, I’ve been really wanting to learn how to organize my code better and make things reusable and this video helped me out a ton. Thanks for putting out awesome content!

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

    This sooo good. Clear structure and useful information. Not bloated in the slightest.
    Although I sometimes found your accent funny. At points it you sound like a guy who is trying his best to fake a really harsh accent. Except the word class... I have never heard a more majestic pronunciation of the word. 😂

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

    I love full tutorial like this.
    Thanks

  • @baguingi5589
    @baguingi5589 4 ปีที่แล้ว

    My god thank you I was wondering if this was a correct approach and you explain it perfectly

  • @dogaru8957
    @dogaru8957 3 ปีที่แล้ว

    Nice job your video really showed me inheritances how simply are

  • @bladeinferioryt
    @bladeinferioryt 4 ปีที่แล้ว

    really appreciate this man definitely earned my sub. Fantastic in depth explanations and really cleared things up with how to use inheritance cheers

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

    Whatt!!? 3k subs only you should be 10 million subs
    Thank you for the tutorial ☺️

  • @seddikmekki34
    @seddikmekki34 4 ปีที่แล้ว

    Great work. This tutrial is extremely helpful. Big thanks

  • @bajajjumping5621
    @bajajjumping5621 4 ปีที่แล้ว

    Outstanding unity tutorial man!!! Keep it up!!!

  • @hiiambarney4489
    @hiiambarney4489 4 ปีที่แล้ว

    Thank you so much, I had a hard time understanding how to properly structure a game project and this is a huge step forward. For being more or less a newb in coding, I often get overwhelmed when things don't explain themselves. (Like the virtual void and protected functions. They didn't do anything different on their own so I was puzzled how they would work.)

  • @Ironlionm4n
    @Ironlionm4n 3 ปีที่แล้ว

    Curious why not make the methods abstract in the base class?

  • @WooGad0Xo
    @WooGad0Xo 2 ปีที่แล้ว

    The tutorial is Awesome!

  • @yogesh6210
    @yogesh6210 3 หลายเดือนก่อน

    very underrated man you helped megood job 😀😀😀😀

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

    Great tutorial as usual! :D

    • @beaverjoe9171
      @beaverjoe9171  5 ปีที่แล้ว

      Thanks for your likes!!! 😊😊

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

    the best tutorial!!!

  • @gab15042
    @gab15042 3 ปีที่แล้ว

    Great Video, I learned a lot!

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

    Now the question is, how do i call the DamageEnemy function from the player

  • @geoff-dev
    @geoff-dev 5 ปีที่แล้ว +1

    Nice tutorial! Your channel helps me a lot. :)

    • @beaverjoe9171
      @beaverjoe9171  5 ปีที่แล้ว

      I am glad to see my tutorial can help you guys easy to understand! Appreciate!!

  • @carlabalos3884
    @carlabalos3884 3 ปีที่แล้ว

    Hello nice tutorial. It would be great if you make a tutorial on oop being applied in game development. I really am struggling to apply those concepts in game development and do a lot of research.

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

    Really helpfull, thanks a lot!

  • @NIKOSPARAPONIARIS
    @NIKOSPARAPONIARIS 3 ปีที่แล้ว

    You are the Best!

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

    great tutorial :D

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

      Italo Veras thx. The next episode is coming in one week. 🎈☺️

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

    Your channel is pretty cool just found out now

    • @beaverjoe9171
      @beaverjoe9171  5 ปีที่แล้ว

      Thought that’s my honor 😊. Thanks for your likes.

  • @gamegod1882
    @gamegod1882 4 ปีที่แล้ว

    Hi Joe, really thanks for your video! It help me a lot. However, I am creating my own game and need some advice from you.
    As this video is about enemy, may I know how about the Player?
    I have learn using "private static Player instance;" for my game from other video.
    And when I try to access the player data from enemy. I will use "Player.instance.data"
    As now I just have one player in my game, all seems fine.
    But what I decide in future is to create more character for selection and also may be also contain 2 player inside the game at same time. So, may I know I am using "Player.instance.data" to access the player data is right or not? Will it cause problem when enemy attacking the player later?
    Last more question, I use one "Enemy" script to two enemy with assign different data.
    like - E1 have 1 atk ability
    Ew have 2 atk ability
    When the enemy attacking the player, it looks they just damage the same value 1........ What happen with that?
    Sorry for such long question.
    Thank you.

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

    Very niiice!

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

      Thanks~Next video will combine inheritance with ScriptableObject~ Hopefully you will like it

  • @NOBODY-bv1bl
    @NOBODY-bv1bl 4 ปีที่แล้ว +1

    Hello joe!
    I want to know ,if target player more than 2
    The enemy should choose most near player.
    how could I do?

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

      諾倚麟 Hi. Select to use Vector2.Distance to calculate or Sqrt method to calculator which player close to the enemy. The second one will cost less calculator to Computer

    • @NOBODY-bv1bl
      @NOBODY-bv1bl 4 ปีที่แล้ว +1

      @@beaverjoe9171 Thanks!! i try it😘

    • @NOBODY-bv1bl
      @NOBODY-bv1bl 4 ปีที่แล้ว +1

      @@beaverjoe9171 I made it!😂😂😂😂
      But my script looks ugly & long.
      How can I share with u?

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

      諾倚麟 zhouzheyuan123456@gmail.com
      Here is my email address. If u are able to Chinese. I have one Chinese channel share more videos for u. My lastest episode have the link.

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

    Thanks

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

    很多不错的视频,订阅支持一波。(Nice video man! Already sub for more updates. )

    • @beaverjoe9171
      @beaverjoe9171  5 ปีที่แล้ว

      LeeT Game Development 谢谢支持,超级感谢兄弟!😆😆😆

    • @LeeTGame
      @LeeTGame 5 ปีที่แล้ว

      @@beaverjoe9171 别客气,必须的。:)

  • @DashzRight
    @DashzRight 4 หลายเดือนก่อน

    impossible to understand a thing

  • @鬼谷海道
    @鬼谷海道 5 ปีที่แล้ว

    日常支持一波~~哈哈 可以搞个Q群呀~~ 推广下中国的QQ 哈哈哈~~让外国友人了解中国游戏~~~~

    • @beaverjoe9171
      @beaverjoe9171  5 ปีที่แล้ว

      谢谢谢谢!我正好在做下一期,我准备等人多了弄一个discord。想到时候推广一下中国风的游戏!