[내일 배움 캠프 Unity 4기] W5D1 05.13 TIL

김용준·2024년 5월 13일
0

내일배움캠프

목록 보기
13/47

Goals

  • Do my best for the personal project
  • Learn the C# grammar

Personal project

From the lecture, I have developed features based on the top view 2D RPG.
Beginning with the character, my project has improved with below list.
1. Make character(the player)
2. Move character with input system
3. Design the map with tile pallete
4. Follow the view by controlling camera
5. Apply animation to the character
6. Insert name for the player
7. Choose the character of player's perferance

C# grammar in Unity

To implement the features on the personal project, I have encountered some issues(not critical error, but it stimulate my curiosity). Through the below example, we can see the issue

public void TestMethod(Vector2 v2)
{
  if(v2 == Vector2.up)
  {
    // Possible
  }
  switch(v2)
  {
    case Vector2.up:
    // Impossible
      break;
  }
}

Even I investigated the issue with the reference, I had not clearly swear the origin of error. Anyone who can explain the difference between if and switch, please reply the comments...

profile
꿈이큰개발자지망생

0개의 댓글