목록2023/07/09 (2)
코드네임 :
옵젝풀부터 설명좀 다시 들으삼 정적변수가지고 싱그론 패턴 객체 만듦 ScoreManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; // 여기 써있는 Start()과 Update()는 private이므로 ScoreManager에서만 사용가능 //SetScore(int value)는 외부에서 쓸 수 있음 public class ScoreManager : MonoBehaviour { public Text currentScoreUI; public int currentScore; public Text bestScoreUI; public int bestScore; pub..
점수 (UI 설정) ~UI.text = "~" + ~ : 옆에 있는 글자로 덮어씌우기 인듯,, - + -> text eventsystem : 우리가 어떤 버튼, UI를 클릭했을 때 그런 걸 인식해서 보내주는 기능( 이벤트 처리하는 부분 ) text : UI에다가 글자를 출력하고자 한다면 반드시 사용해줘야 함 - text이름 currentscore로 바꿈 ( 두 사진 중에서 한 가지 방법으로만 바꾸면 됨) 현재점수 최고점수 짠 ScoreManager Hierarchy에서 create empty로 생성 (얘도 transform을 Reset) script도!! scoremanager.cs using System.Collections; using System.Collections.Generic; using Un..