유니티 심화 86

절대강좌 유니티 - 깡통 주변 폭파, 3대 맞으면 파괴, 이펙트,

RemoveBullet using System.Collections; using System.Collections.Generic; using UnityEngine; public class RemoveBullet : MonoBehaviour { [SerializeField] private GameObject sparkEffect; private void OnCollisionEnter(Collision collision) { Debug.Log(collision); //if(collision.collider.CompareTag("Bullet")) //{ //} if(collision.collider.tag == "Bullet") { //스파크 파티클을 동적으로 생성 //Instantiate(sparkEffec..

유니티 심화 2023.08.21

[주말과제] - 궁수의 전설[완]

일단 배경 생성 사용한 에셋 1. 조이스틱 움직이면 움직이게 설정 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] private float moveSpeed = 2f; [SerializeField] private VariableJoystick joystick; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { //조이스틱 x, y좌표 Vect..

유니티 심화 2023.08.19

SpaceShooter2D - 스페이스바 눌러서 총쏘고 제거하기 [완]

PlayerController using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] private float moveSpeed = 3f; private Animator anim; [SerializeField] private BulletController bulletController; // Start is called before the first frame update void Start() { this.anim = this.GetComponent(); } // Update is called once ..

유니티 심화 2023.08.18