// Start is called before the first frame update void Start() { mPlayer = GameObject.FindGameObjectWithTag("Player"); mBox = GameObject.FindGameObjectWithTag("InteractObj"); mBoxPull = mBox.GetComponent <BoxPull>(); }
bool IsPush; //button이 눌리면 true, 떼지면 false void Start() { mBoxPull = GetComponent <BoxPull>(); //BoxPull script 가져오기 mPlayerCtrl = GetComponent <PlayerCtrl>(); }