Tag Info

New answers tagged

0

Keep in mind that in XNA (and all other 3D libraries), 2D is 3D! In XNA, sprites are just 3D planes drawn to the screen. Any shader you use in 3D will work just as well with the spritebatch. Spritebatch.Begin() has a parameter for the shader to pass in. If I'm following you, you want to use the depth image to blend between two images. Here's what I would ...


1

The coroutine itself will pause, but the code that called StartCoroutine() will keep going. So in this case, WaitTime() will pause but OnTriggerEnter2D() will keep going. What you probably want instead is for the entire button logic to go in the coroutine. Then it won't matter that OnTriggerEnter2D() keeps going, since starting the coroutine is all it does. ...


1

Your WaitTime Coroutine will not pause the evaluation of the following code. The Coroutine will be kicked off and logic will immediately continue. Your Coroutine is waiting 3 seconds and will call that print function wherever it resides but that's all it will do. You should probably go with something like: private float triggerEnterTime = 0; void ...



Top 50 recent answers are included