This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerCtrl : MonoBehaviour | |
{ | |
//컴포넌트를 캐시 처리할 변수 | |
private Transform tr; | |
//Animation 컴포넌트를 저장할 변수 | |
private Animation anim; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerCtrl : MonoBehaviour | |
{ | |
//컴포넌트를 캐시 처리할 변수 | |
private Transform tr; | |
//Animation 컴포넌트를 저장할 변수 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//내비게이션 기능을 사용하기 위해 추가해야 하는 네임스페이스 | |
using UnityEngine.AI; | |
public class MonsterCtrl : MonoBehaviour | |
{ | |
//몬스터의 상태 정보 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//내비게이션 기능을 사용하기 위해 추가해야 하는 네임스페이스 | |
using UnityEngine.AI; | |
public class MonsterCtrl : MonoBehaviour | |
{ | |
//몬스터의 상태 정보 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//내비게이션 기능을 사용하기 위해 추가해야 하는 네임스페이스 | |
using UnityEngine.AI; | |
public class MonsterCtrl : MonoBehaviour | |
{ | |
//컴포넌트 캐시 처리할 변수 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RemoveBullet : MonoBehaviour | |
{ | |
//스파크 파티클 프리팹 연결할 변수 | |
public GameObject sparkEffect; | |
//충돌이 시작할 때 발생하는 이벤트 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FireCtrl : MonoBehaviour | |
{ | |
//총알 프리팹 | |
public GameObject bullet; | |
//총알 발사 좌표 | |
public Transform firePos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MyGizmos : MonoBehaviour | |
{ | |
public Color _color = Color.yellow; | |
public float _radius = 0.1f; | |
void OnDrawGizmos() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RemoveBullet : MonoBehaviour | |
{ | |
//충돌이 시작할 때 발생하는 이벤트 | |
void OnCollisionEnter(Collision coll) | |
{ | |
//충돌한 게임오브젝트의 태그값 비교 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class BulletCtrl : MonoBehaviour | |
{ | |
//총알의 파괴력 | |
public float damage = 20.0f; | |
//총알 발사 힘 | |
public float force = 1000.0f; |