// 카메라 셋팅 public void Setup(CCameraTarget _target) { CCameraTarget _CameraTarget = _target.GetComponentInChildren <CCameraTarget>(); m_Target = _CameraTarget.GetComponent <Transform>(); // 레이캐스트 포인트 받기 m_TargetContoller = _target.GetComponent <CPlayerContoller>(); }
public IEnumerator _Roll(int rollNumber) { animator.SetTrigger("RollForwardTrigger"); CPlayerContoller cp = GetComponentInParent <CPlayerContoller>(); Transform temp = cp.GetComponent <Transform>(); Debug.Log(temp.transform.position); Vector3 targetTemp = new Vector3(temp.transform.position.x * 1.5f, temp.transform.position.y, temp.transform.position.z * 1.5f); temp.transform.position = Vector3.MoveTowards(temp.transform.position, targetTemp, 5f * Time.deltaTime); isRolling = true; yield return(new WaitForSeconds(rollduration)); isRolling = false; }
public CRayFloor m_RayFloor; // 메인 카메라의 레이캐스트와 충돌 체크할 Floor void Awake() { m_Controller = GetComponent <CPlayerContoller>(); }