목록BCA/4. Unity (25)
VioletaBabel
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816..
에셋스토어에서 dotween 무료버전 다운 후, tools-demigiant-dotween utility panel을 누른 후 setup을 누른다. order in layer가 크면 더 앞으로 나옴 1234567891011121314151617181920212223242526272829303132333435363738//StoneScript.csusing System.Collections;using System.Collections.Generic;using UnityEngine; public class StoneScript : MonoBehaviour{ public Vector3 mDir; public float speed; public float damTime; public int hp; public ..
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136//GameManagerScript.csusing System.Collections;using System.Collections.Generic;using UnityEngine;..
유니티 시작rigidbody = 중력이 작용하나봄 assets에서 create-physic material을 만들어 bounciness에는 튀게 할 정도 (1.0이면 완전탄성충돌)상자와 공에 각자 이 피직스를 넣어주자.그리고 실행하면 둘이 부딪히면 통통 튄다.bounce combine에서 average를 하면 양쪽에 들어간 바운시니스의 평균값, 멀티플은 곱값 등으로 적용됨.dynamic friction = 마찰력 1234567891011121314151617181920212223242526using System.Collections;using System.Collections.Generic;using UnityEngine; public class NewBehaviourScript : MonoBehavio..