//가상함수, 완성된함수이지만 추가 편집이 가능한 함수 public virtual void CloseWeaponChange(HandAnim _hand) //무기교체 { if (Weaponmanager.currentWeapon != null) //무기를 바꾸려 하는데 기존에 들고있는 무기가 있다면 비활성화, static으로 선언해두었기 때문에 별도의 객체를 생성하지 않아도 사용 가능 { Weaponmanager.currentWeapon.gameObject.SetActive(false); } currentCloseWeapon = _hand; Weaponmanager.currentWeapon = currentCloseWeapon.GetComponent <Transform>(); //이건 .transform과 뭐가 다른거지?? Weaponmanager.currentWeaponAnim = currentCloseWeapon.anim; currentCloseWeapon.transform.localPosition = new Vector3(0.12f, -0.72f, -0.61f); currentCloseWeapon.gameObject.SetActive(true); }
public override void CloseWeaponChange(HandAnim _hand) { base.CloseWeaponChange(_hand); //공통분모 isActivate = true; //부모클래스에서 추가로 편집 }