유니티 기초 40

로비씬, 사과, 폭탄 - [게임종료구현, 종료 후 스코어 미구현]

EndMain using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class EndMain : MonoBehaviour { [SerializeField] private Button btnLobby; [SerializeField] private Button btnRestart; [SerializeField] private List basketPrefabs; // Start is called before the first frame update void Start() { //할거 없..

유니티 기초 2023.08.07

로비씬, 사과, 폭탄 - [능력구현, 로비씬구현, 게임구현, 게임종료화면 미구현]

https://kjun.kr/1207 Button을 SetActive하는 법을 잘 몰랐는데 블로그를 검색하다가 잘 알게되었다. GameMain using System.Collections; using System.Collections.Generic; using UnityEngine; //모든 게임씬 애들 관리 public class GameMain : MonoBehaviour { private BasketController basketController; [SerializeField] private List basketPrefabs; private ItemGenerator itemGenerator; private GameObject gameDirectorGo; // Start is called befor..

유니티 기초 2023.08.07

3D 유니티 LookAt, 유니티 짱, Raycast, 클릭한 위치로 이동

transform.Lookat(target); [목표를 향해 간다] [버튼을 누르면 앞으로 가고 벽을 만나면 멈추는 기능] using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; public class PlayerController : MonoBehaviour { private Animator anim; private bool isMove = false; private Rigidbody rBody; public float moveSpeed = 1f; public Transform target; // Start is called before the first frame..

유니티 기초 2023.08.04

챕터7 밤송이 [수정필]

씬 뷰에서 바라보는 시선으로 카메라(오브젝트 방향) 바꾸기 : Ctrl + Shift + F 색칠하기 Texture(그림), 매터리얼 필요 BamsongiController using System.Collections; using System.Collections.Generic; using UnityEngine; public class BamsongiController : MonoBehaviour { private Rigidbody rBody; [SerializeField] private float forwardForce = 2000; private ParticleSystem effect; // Start is called before the first frame update private void Aw..

유니티 기초 2023.08.04