Komentáře •

  • @gabrielwhite9881
    @gabrielwhite9881 Před 2 měsíci

    Just to mention it. Another important thing about inheritance is that you can use override and virtual. means that TakeDamage can only contain a debug message and the override in your Enemy1 or Enemy2 could override this TakeDamage to handle the logic differently. :) Therefore, inheritance is very powerful, especially when combined with interfaces. :) but, great video, like always. :)

  • @Dehakuzo
    @Dehakuzo Před 2 měsíci

    This is the first time Interfaces have been shown in a way that I get the benefit. Far better for modularity and able to have unique code ran between them. Nicely shown.

    • @b3agz
      @b3agz Před 2 měsíci

      Thanks for watching, glad it was useful!

  • @DoigSwift
    @DoigSwift Před 2 měsíci

    This is super useful, thanks for making this b3agz. I'm itching to refactor some of my approaches to things with this new knowledge!

    • @b3agz
      @b3agz Před 2 měsíci

      The battle against the urge to fix all the stuff past-you did is real >.< Thanks for watching!

  • @TurtleGamesStudios
    @TurtleGamesStudios Před 2 měsíci

    I didn’t know about this! Thanks! Very helpful with a couple of small projects I’m working on.

    • @b3agz
      @b3agz Před 2 měsíci

      Great to hear!

  • @ragerungames
    @ragerungames Před 2 měsíci

    Yeah, interfaces are super useful. Like from my recent experience, it wouldn't have been easier for me to add multiple controller types for my flying system asset. Just with the power of interfaces, I am able to plug in any new input type on the fly with less code and without causing any breakage.

    • @b3agz
      @b3agz Před 2 měsíci

      Yeah I'm ashamed to say I only started using them recently. Super useful. Thank for watching!

  • @beardordie5308
    @beardordie5308 Před 2 měsíci

    Good one! Next up: how to serialize an interface to show up in the inspector

    • @b3agz
      @b3agz Před 2 měsíci

      Good idea! Thanks for watching

  • @anonymous49125
    @anonymous49125 Před 2 měsíci

    interfaces are promises of what a class can do, classes are what objects are.
    9:45 - I think that misses the point of interfaces, as you can modify methods in classes by making those methods abstract and overriding them... so interfaces are NOT about having different methods do different things. The reason for interfaces are: to allow classes to not inherent from other classes in order to just create a contract saying a specific method will in fact be available on the class... a better way to say it is: interfaces are promises of what a class can do, classes are what objects are.
    So, even though a rubber ball, my checking account, and a dead baby, all have the ability to 'bounce()' that does not mean that they are objects of the same type... they are different objects and one does not inherent from another... however, with interfaces you can have a list of 'bounceable things' and you can call 'bounce()' on each of those things without worry, knowing that 'bounce()' is a valid method. Since interfaces are implemented on each class that uses them, they can have a unique way to deal with how the 'bounce()' method should function.

  • @Simplexr_Yt
    @Simplexr_Yt Před 2 měsíci

    laushan dinglenut :D

  • @TurtleGamesStudios
    @TurtleGamesStudios Před 2 měsíci

    First