Тёмный

Fixing Pickup Collection - Creating a Rogue-like (like Vampire Survivors) in Unity: Part 17 

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

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

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@terresquall
@terresquall 11 дней назад
Hi all, if your health bar is not updating whenever your player picks up a health potion or regenerates, we've included a fix on our Blog to cover it. You can view the fix here - blog.terresquall.com/2024/02/creating-a-rogue-like-vampire-survivors-part-17/#fixing-the-health-bar-not-updating-after-healing
@kskefeafyonlu560
@kskefeafyonlu560 7 месяцев назад
Such determination i really appreciate your videos man
@narkka2224
@narkka2224 6 месяцев назад
Hello! Im loving the tutorial series so far. I was wondering if there will be a way to implement mouse aiming for the weapons?
@terresquall
@terresquall 6 месяцев назад
Definitely. Can you make a post about it on the forums? I'll give you the code from there.
@Magma-uw7yo
@Magma-uw7yo 16 дней назад
I still have an issue with the enemies, they push me and and I'ld like to stop them. I use their speed on trigger enter, stay and exit but I sill have this issue. Thank you for all
@terresquall
@terresquall 16 дней назад
@@Magma-uw7yo would you mind creating a topic about this on the forums? I will show you some code that will help you correct this.
@GrimMemento
@GrimMemento 7 месяцев назад
Did you change your tutorials back to normal or are you still changing your whole style to template based? I was following this tutorial for a while but had to stop because a lot wasn't working for me after a while.
@terresquall
@terresquall 7 месяцев назад
Hi Grim, the tutorials are more similar in style to Parts 15 and 16, but this one delves deeper into the technicalities because it is specifically about a bugfix. Sorry to hear the new style isn't working for you. If you can find the time to screenshot or video your issues and post them on our forums, we will be more than happy to help you with it.
@Oranges364
@Oranges364 3 месяца назад
Hello, will I be able to do this fix if my code is still at part 9? If so, how would I go about that since I dont have that actualstats part? I noticed the problem shortly after implementing the magnet and I´d like to fix it earlier before going through the other videos
@terresquall
@terresquall 3 месяца назад
You should be able to follow about 80% of it. For the PlayerStats part, you can just tentatively call SetRadius() on the Awake() function. If you have any further questions, you can create a topic on our forums. It is easier for us to share code over there: blog.terresquall.com/community
@cassieel24
@cassieel24 3 месяца назад
​ @terresquall ​ I tried to do that and it didn't work. Here's the code in PlayerStats PlayerCollector collector; void Awake() { //Define valor das variáveis currentHealth = characterData.MaxHealth; currentRecovery = characterData.Recovery; currentMoveSpeed = characterData.MoveSpeed; currentMight = characterData.Might; currentProjectileSpeed = characterData.ProjectileSpeed; currentMagnet = characterData.Magnet; collector = GetComponentInChildren(); collector.SetRadius(); }
@terresquall
@terresquall 3 месяца назад
@@cassieel24 hi cassiel, can you share the entire piece of code in the forums? As well as any error that might be there in your Console window.
@gutzimmumdo4910
@gutzimmumdo4910 6 месяцев назад
is this actually scalable? you are only spawning 5 or 6 npcs how would it behave in 50 100 and so on npcs?
@terresquall
@terresquall 6 месяцев назад
Yup, this is scalable, and definitely works with 50 or 100 NPCs. At larger scales, we can make further optimisations to the pickup or enemy scripts to accommodate even more entities. I'm reworking the enemy scripts in Part 19.
@nightyonetwothree
@nightyonetwothree 6 месяцев назад
i dont think collectable item should determine the behaviour of how it's moving, only the effect of being collected. On other side the collector should do the moving collectables behaviour (simply by tracking them in a list) as it's his main purpose. If you switch/refactor/whaterver the playerstats or collector - there should nothing changed in collectables, but in your solution it will cause a problem.
@terresquall
@terresquall 6 месяцев назад
Thanks for sharing nighty. Can you elaborate more on the problems that this change will cause?
@nightyonetwothree
@nightyonetwothree 6 месяцев назад
@@terresquall one of the SOLID princibles is single responsibility. Even if you dont want to go stricktly to all these principles, still dividing responsibility between scripts is good logic. In your solution: pickups not only provide collect function, but also they move themselves to the player. While collector just setup them to self-behave; if you change, for example: 1. default Collector script to CollectorViaTeleportation or ZigZagCollector or AntiCollector(move items from player for example) - you'll be forced to go into collectibles script to change inner logic also. 2. you change playerStats to other data container/system to represent player's data -> now you need to change collectibles' script to ask for other parameters in collect() function; Etc. The more natural to oop solution is: collectibles know nothing about collector or player(or his stats); They also dont move by themselves; collector know about collectibles and interact with them (move them to itself, collect them if they in close radius, or even maybe stop moving them if they fall out of radius); That's its' role by name;
@nicoledawson634
@nicoledawson634 5 месяцев назад
😱 Promo sm
Далее
Unity - Weighted Randoms
6:37
Просмотров 92
What Happens To Your Body When You Run A Marathon?
9:11