Example #1
0
        public void Init(ClosetControl closetCtrl)
        {
            closetControl = closetCtrl;

            Camera2DFollow.followControl.target  = closetControl.transform;
            Camera2DFollow.followControl.damping = 0.2f;

            if (!closetControl)
            {
                //this is not a closet. Could be a coffin or disposals
                Debug.LogWarning("No closet found for ClosetPlayerHandler!" + " maybe it's time to update this component? (see the todo's)");
                Destroy(this);
            }
            else
            {
                monitor = true;
            }
        }
        public void Init(ClosetControl closetCtrl)
        {
            closetControl = closetCtrl;

            if (!PlayerManager.LocalPlayerScript.playerNetworkActions.isGhost)
            {
                // TODO: Change this stuff to the proper settings once re-entering corpse becomes a feature.
                Camera2DFollow.followControl.target  = closetControl.transform;
                Camera2DFollow.followControl.damping = 0.2f;
            }

            if (!closetControl)
            {
                //this is not a closet. Could be a coffin or disposals
                Debug.LogWarning("No closet found for ClosetPlayerHandler!" + " maybe it's time to update this component? (see the todo's)");
                Destroy(this);
            }
            else
            {
                monitor = true;
            }
        }