Welcome to the Unity Game Development series!
Lesson Overview:
I'll show an alternative way, than the timer from the previous lesson, to delay a function over time in Unity. We use InvokeRepeating for this.
Another way is by using a Coroutine using IENumerator. I'll show how to do this.
And we create a bullet prefab with a C# script attached to it to shoot a bullet into the air.
And finally we ensure that a bullet is fired when the player presses the space bar using instantiate in the movement C# script.
♥ Subscribe: / @stayincontrole
00:00 Intro
00:55 InvokeRepeating
02:39 IENumerator
07:01 Create a Bullet Prefab
11:11 Fire a Bullet
13:28 Outro
#gamedev
#tutorial
#csharp
#unitygamedev
#gamedevelopment
#unity3d
In questa pagina del sito puoi guardare il video online Delay a Function over time in della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Unity Game Dev Tutorial: build your first 3D game 28 marzo 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 16 volte e gli è piaciuto 4 spettatori. Buona visione!