유니티2 C# 유니티 오디오 컴퍼넌트 만들기. using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(AudioSource)) ] // unity 창에서 audio사운드 넣을수 있게. public class Control : MonoBehaviour { private float h = 0.0f; private float v = 0.0f; private float r = 0.0f; private float moveSpeed = 10.0f; private float rotationSpeed = 100.0f; private Transform playerTr; private int key; public AudioClip ksyS.. 2022. 1. 13. 유니티 C# 객체 끼리 충돌 할때 뭔가를 하고 싶을때 ??? 필요한 함수 using System.Collections; using System.Collections.Generic; using UnityEngine; public class player : MonoBehaviour { Rigidbody rigid; public float Jump_Power; bool isJump; void Awake() { rigid = GetComponent(); } void Update() { if (Input.GetButtonDown("Jump") && !isJump) { isJump = true; rigid.AddForce(new Vector3(0, Jump_Power, 0), ForceMode.Impulse); } } // Update is called once per frame voi.. 2022. 1. 6. 이전 1 다음