Example #1
0
        protected virtual void OnBuilt(GameObject built)
        {
            ZiplineArchitect component = built.GetComponent <ZiplineArchitect>();

            component._gate1.transform.position = this._gate1.transform.position;
            component._gate1.transform.rotation = this._gate1.transform.rotation;
            component._gate2.transform.position = this._gate2.transform.position;
            component._gate2.transform.rotation = this._gate2.transform.rotation;
            component.EnsureGatesDestroyProxies(true);
            component._wasBuilt = true;
        }
        private void RespawningRenderersFrom(GameObject respawned)
        {
            ZiplineArchitect component = respawned.GetComponent <ZiplineArchitect>();

            component._gate1.transform.parent   = this._gate1.transform.parent;
            component._gate1.transform.position = this._gate1.transform.position;
            component._gate1.transform.rotation = this._gate1.transform.rotation;
            component._gate2.transform.parent   = this._gate2.transform.parent;
            component._gate2.transform.position = this._gate2.transform.position;
            component._gate2.transform.rotation = this._gate2.transform.rotation;
            UnityEngine.Object.Destroy(this._gate1.gameObject);
            UnityEngine.Object.Destroy(this._gate2.gameObject);
            this._gate1 = component._gate1;
            this._gate2 = component._gate2;
        }