분류 전체보기 127

유니티 시민강좌 2일차

배경화면 움직이기(플레이하는 동안 반복) using System.Collections; using System.Collections.Generic; using UnityEngine; public class BackgroundRepeat : MonoBehaviour { public float scrollSpeed = 0.9f; //스크롤할 속도를 상수로 지정해 줍니다. private Material thisMaterial; //Quad의 Material 데이터를 받아올 객체를 선언합니다. void Start() { //객체가 생성될때 최초 1회만 호출 되는 함수 입니다. thisMaterial = GetComponent().material; //현재 객체의 Component들을 참조해 Renderer라는 ..

UNITY/Unity Study 2023.07.19

유니티 시민강좌 1일차

배경 끝없이 이어지게... 회전? 시키기 불이랑 용가리에 파티클 효과 넣고 화면밖의 불 없애고 반투명한 구름들 배치 더보기 플레이어 코드 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { public float moveSpeed = 5.0f; // 움직이는 속도를 정의해 줍니다. public GameObject firePrefab; // 발사할 탄을 저장합니다. public bool canShoot = true; // 탄을 쏠 수 있는 상태인지 검사합니다. public float shootDelay = 0.5f; // 탄을 쏘는 주기를 정해줍니다...

UNITY/Unity Study 2023.07.17