게시글
질문&답변
2021.10.01
크로스헤어 문제
저... 해결했습니다! Move()함수에 있는 _velocity를 함수안에다 놓지말고 젤 위에 작성해서 스크립트 내에서는 얼마든지 사용할 수 있게 한다음 MoveCheck() 함수를 void MoveCheck() { if (!isRun && !isCrouch && isGround) { if (velocity.magnitude >= 0.01f) isWalk = true; else isWalk = false; theCrosshair.WalkingAnimation(isWalk); lastPos = transform.position; } } 이렇게 위에 보이는 것처럼 적으시면 됩니다. 전 위치와 지금 위치의 거리를 이용하는 것이 아닌 속도를 이용하는 방식이죠. 그럼 도움이 됬으면 좋겠군요!
- 1
- 7
- 442
질문&답변
2021.09.28
크로스헤어 문제
안녕하세요. 저와 같은 문제를 격고 있는 사람이 많은 것 같군요.ㅠㅠ 저 같은 경우에는 아예 큰 결심을 하고 처음부터 다시하고 있어요. 하.... 예전에 했던 데까지 가는데 시간이 좀 걸릴 것 같아요.ㅠㅠ
- 1
- 7
- 442
질문&답변
2021.06.06
기본에셋이없어요!
안녕하세요. 기본에셋은 '학습하기'버튼 말고 따른데눌러보시면 에셋다운로드하는 곳있는데 그거 다운받아서 다운받은거 유니티 프로젝트창 에다가 드래그해서 놓으시면 되요. 돔이 됬으면 좋겠네요.ㅎㅎ (사진)여기서 바로학습 말고 저 그림 누르시면 (사진)이런 창이 하나 보일건데 이거 다운받으시면 됩니다.
- 0
- 1
- 157
질문&답변
2021.04.02
크로스헤어 문제
안녕하세요. 저와 똑같은 상황을 격고 계시군요ㅠㅠ 저 오류때문에 애니메이션도 실행이 재대로 안돼는 것 같습니다. 그리고 또 엄청 많은 오류를 겪고 있는데 해결이 안돼요ㅠㅠ
- 1
- 7
- 442
질문&답변
2021.03.22
크로스헤어 문제
전체코드:(HUD) using System . Collections ; using System . Collections . Generic ; using UnityEngine ; using UnityEngine . UI ; public class HUD : MonoBehaviour { [ SerializeField ] private GunController theGunController ; private Gun currentGun ; [ SerializeField ] private GameObject go_BulletHUD ; [ SerializeField ] private Text [] text_Bullet ; // Update is called once per frame void Update () { CheckBullet (); } private void CheckBullet () { currentGun = theGunController . GetGun (); text_Bullet [ 0 ]. text = currentGun . carryBulletCount . ToString (); text_Bullet [ 1 ]. text = currentGun . reloadBulletCount . ToString (); text_Bullet [ 2 ]. text = currentGun . currentBulletCount . ToString (); } }
- 1
- 7
- 442
질문&답변
2021.03.22
크로스헤어 문제
전체코드:(crosshair) using System . Collections ; using System . Collections . Generic ; using UnityEngine ; public class crosshair : MonoBehaviour { [ SerializeField ] private Animator animator ; private float gunAccuracy ; [ SerializeField ] private GameObject go_CrosshairHUD ; public void walkingAnimation ( bool _flag ) { animator . SetBool ( "walking" , _flag ); } public void runningAnimation ( bool _flag ) { animator . SetBool ( "running" , _flag ); } public void crouchingAnimation ( bool _flag ) { animator . SetBool ( "crouching" , _flag ); } public void FireAnimation () { if ( animator . GetBool ( "walking" )) animator . SetTrigger ( "walk_fire" ); else if ( animator . GetBool ( "crouching" )) animator . SetTrigger ( "crouch_fire" ); else animator . SetTrigger ( "idle_fire" ); } }
- 1
- 7
- 442
질문&답변
2021.03.16
효과음 넣을 때 오류
전체 코드: using System . Collections ; using System . Collections . Generic ; using UnityEngine ; public class GunController : MonoBehaviour { [ SerializeField ] private Gun currentGun ; private float currentFireRate ; private AudioSource audioSource ; void start () { audioSource = GetComponent AudioSource >(); } // Update is called once per frame void Update () { GunFireRateCalc (); TryFire (); } private void GunFireRateCalc () { if ( currentFireRate > 0 ) currentFireRate -= Time . deltaTime ; } private void TryFire () { if ( Input . GetButton ( "Fire1" ) && currentFireRate 0 ) { Fire (); } } private void Fire () { currentFireRate = currentGun . fireRate ; Shoot (); } private void Shoot () { PlaySE ( currentGun . fire_Sound ); currentGun . muzzleFlash . Play (); Debug . Log ( "총알 발사함" ); } private void PlaySE ( AudioClip _clip ) { audioSource . clip = _clip ; audioSource . Play (); } }
- 0
- 1
- 331
질문&답변
2021.03.08
공 만들기에서(공 불러오기) 오류가 뜹니다
저 해결했습니다! ,(쉼표)가 안들어가 있었어요
- 0
- 3
- 173
질문&답변
2021.03.07
공 만들기에서(공 불러오기) 오류가 뜹니다
여기서 File "c:\Users\w10\Desktop\python work space\pygame_basic\pygame_project\3_ball_movement.py", line 57 pygame.image.load("C:\\Users\\w10\\Desktop\\python work space\\pygame_basic\\pygame_project\\images\\balloon2.png") ^ SyntaxError: invalid syntax PS C:\Users\w10\Desktop\python work space\pygame_basic> 이런 오류가 뜹니다. 참고로 불러오기도 저 방법박에 안 통합니다. weapon 불러오기나 따른 것은 잘 되었는데 저기에서만 오류가 있다고 뜨네요 뭐가 문제인지 알려주세요.
- 0
- 3
- 173
질문&답변
2020.12.28
디퓨즈 컬러가 없어요
어! scanline으로 바꾼 것 만으로도 되네요! 감사합니다
- 0
- 17
- 341