Space Shooter Flashcards

(6 cards)

1
Q

Difference in mechanic of player shooting and enemy shooting

A

Player shooting: Uses a coroutine
Enemy shooting: Uses a timer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do we change the collision layer of an object?

A

Physics 2D then Layer Collision Matrix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What value do we access to make the background scroll?

A

The texture offset -> Y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Loading scene by name and index

A

You can load scenes with both the scene index and the string name of the scene
(0) Allows you to do something with the index 0
(“0”); Allows you to do something with the name 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Code to play sound

A

AudioSource.PlayClipAtPoint(deathSound, Camera.main.transform.position, deathSoundVolume);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Debugging a Coroutine

A

Coroutine needs IEnumerator as the return type and a yield return statement inside the coroutine. It also needs to be called using StartCoroutine();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly