내일배움캠프(Unity)
내일배움캠프 게임개발(Unity) 사전캠프 7일차 TIL - 게임개발종합반 시작
빵어
2023. 10. 10. 20:31
1. 알고리즘
https://ppang-game.tistory.com/81
백준 2805번 나무자르기 C++
#include #include #include using namespace std; //https://www.acmicpc.net/problem/2805 int n = 0, m = 0; vector treeHeight; int FindMaxHeight(int start, int end) { int maxHeight = 0; while (start mid) takeTree += a - mid; if (takeTree < m) end = mid - 1; e
ppang-game.tistory.com
이분 탐색.. 다른 문제도 풀어볼 것
2. 게임개발종합반 0주차, 1주차 강의 학습
Sprite 렌더 순서
Sprite Renderer - Additional Settings - Order in Layer 값 조정(큰 값이 더 먼저 보임)
2D Sprite 좌우반전
transform.localScale = new Vector3(-1, 1, 1);
싱글톤
public class GameManager : MonoBehaviour
{
public static GameManager I;
void Awake()
{
I = this;
}
public void retry()
{
SceneManager.LoadScene("MainScene");
}
}
public class panel : MonoBehaviour
{
public void retry()
{
GameManager.I.retry();
}
}
retry같은 함수는 GameManager에서 관리해주는 편이 좋다
소수점 둘째자리까지 잘라서 문자열로 바꿔라
변수.ToString("N2");