BootCamp week 1 Flashcards

1
Q

Redo Hotkey?

A

Ctrl + Y

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

Undo Hotkey?

A

Ctrl + Z

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

Generate field Hotkey?

A

Alt + Enter

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

Go to front of line Hotkey?

A

Home

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

Go to Definition Hotkey?

A

F12

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

Rename a word though entire file Hotkey?

A

Crtl + R + R

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

Auto Indent Hotkey?

A

Ctrl + K + D

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

Delete one word Hotkey?

A

Ctrl + Delete

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

Delete entire line Hotkey

A

Shift + Delete

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

Skip to next word Hotkey?

A

Ctrl + Arrow Keys

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

Highlight Word Hotkey?

A

Shift + Arrow Keys

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

How to search for all sprites?

A

Search by type, Choose textures

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

How to tile 2D textures?

A

Change sprite mesh type to Full Rect, Change Draw Mode to Tiled.

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

Extend tiled texture box collider?

A

In box collider click Auto Tiling.

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

What Collider to use on a player for 2D?

A

Polygon Collider

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

How to assign horizontal axis? (Old Input)

A

var horizontal = Input.GetAxis(“Horizontal”);

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

How to get Rigidbody2D?

A

var Rb = GetComponent<Rigidbody2D>();</Rigidbody2D>

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

How to assign new vector2 to rigidbody?

A

Rb.velocity = new vector2(horizontal, vertical);

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

How to assign Rigidbody Y to vertical?

A

var vertical = Rb.velocity.y;

20
Q

How to assign a variable to vertical for jumping? (Old Input)

A

If(input.GetButton(“Fire1”)) { vertical = _JumpVelocity; }

21
Q

How to check how long jump input has been pressed? (Old Input)

A

if (Input.GetButtonDown(“Fire1”) { _maxJumpTimer = Time.time + _JumpDuration }

22
Q

How to check if jump has been pressed and how long its been pressed? (Old Input)

A

If (Input.GetButton(“Fire1”) && _maxJumpTime > Time.time) { vertical = _jumpVelocity }

23
Q

What Components are needed for player to move?

A

Ridigbody, Polygon Collider, Custom Player Script

24
Q

How to show variable in Inspector?

A

[SerializeField]

25
Q

How to get Sprite’s bottom bounds?

A

var float = spriteRenderer.bounds.extents.y;

26
Q

How to create a variable for raycast origin?

A

var origin = vector2(transform.position.x, transform.position.y - spriteRenderer.bounds.extents.y);

27
Q

How to change Gizmo Colors?

A

Gizmos.color = Color.Red;

28
Q

How to Draw a line with Gizmos?

A

Gizmo.DrawLine(origin,origin + vector2.down * 0.1f);

29
Q

How to create a Hit from physics2D?

A

var hit = physics2D.raycast(origin,vector2.down, 0.1f);

30
Q

How to check if Hit has collided with something?

A

If (hit.collider)

31
Q

How to Constraint a 2D character from rotating on Z Axis?

A

In rigidbody2D, Go to constraints, click Z Constraint

32
Q

How to use horizontal to flip the 2D player sprite?

A

if (horizontal > 0) { spriteRenderer.flipX = false; } else if (horizontal < 0) { spriteRenderer.flipX = true; }

33
Q

How to set bool on Animator?

A

animator.SetBool(“Bool Name”, Value);

34
Q

How to set float on Animator?

A

animator.SetFloat(“Float Name, Value);

35
Q

How to get an Absolute number?

A

Math.Abs();

36
Q

What is the best way to set Idle/Walk Animations?

A

Animator Blend State

37
Q

What does a Layer Mask do?

A

Allows a raycast to ignore certain layers physically.

38
Q

How to extract method?

A

Highlight the coded your wanting to extract Alt + Enter then Extract Method

39
Q

How to make jumps remaining?

A

Check if player is grounded and Y velocity is less than or equal to 0, then assign a variable for jumps remaining.

40
Q

How to remove a jump remaining?

A

When player uses the input for jump use
_jumpsRemaining–

41
Q

How to change pitch of Audio Source?

A

AudioSource.Pitch = int/float

42
Q

What is an example of Conditional Expressions?

A

_audioSource = _jumpsRemaining > 0 ? 1 : 1.12f

43
Q

How to create an object with Bouciness?

A

Create a 2D physics material and set friction to 0, and Bounciness to 1

44
Q

Which camera is best to use for smoothness?

A

Cinemachine

45
Q

How to make what sprite have Buoyancy?

A

Use a Buoyancy 2D effector

46
Q

Proper way to sort layers for how objects stack on each other in scene?

A

Create a sorting layer for background, default, player, water, etc