목록전체 글 (64)
아카이브

1. 조이스틱으로 플레이어 캐릭터 이동시키기 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] private VariableJoystick joystick; [SerializeField] private float moveSpeed = 2f; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { //조이스틱으로 이동 float h = this.joy..

BulletController using System.Collections; using System.Collections.Generic; using UnityEngine; public class BulletController : MonoBehaviour { [SerializeField] private float force = 1500f; private Rigidbody rBody; // Start is called before the first frame update void Start() { this.rBody = this.GetComponent(); //방향 * 힘 //월드 좌표 기준으로 힘이 가해짐 this.rBody.AddForce(Vector3.forward * this.force); } Fir..

PlayerController using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { public enum eControlType { Keyboad, Joystick } public enum eAnimState { Idle, RunB, RunF, RunL, RunR } private Transform tr; public float moveSpeed = 10.0f; [SerializeField] private float turnSpeed = 80f; [SerializeField] private VariableJo..

스크립트 Test_BossMain using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Test_Boss { public class Test_BossMain : MonoBehaviour { [SerializeField] private Button btnMove; [SerializeField] private Button btnRemove; [SerializeField] private Bull bull; [SerializeField] private Transform targetTrans; //비활성화 [SerializeField] priva..