Ejemplo n.º 1
0
        protected override void OnSpawn()
        {
            base.OnSpawn();

            GameScheduler.Instance.Schedule("PlumbingTutorial", 2f, delegate
            {
                Tutorial.Instance.TutorialMessage(Tutorial.TutorialMessages.TM_Plumbing);
            });

            utilityCell = GetUtilityCell();

            networkItem = new FlowUtilityNetwork.NetworkItem(portInfo.conduitType, Endpoint.Sink, utilityCell, base.gameObject);
            NetworkManager.AddToNetworks(utilityCell, networkItem, is_endpoint: true);

            partitionerEntry = GameScenePartitioner.Instance.Add("ConduitInput.OnSpawn", base.gameObject, utilityCell, ScenePartitionerLayer, OnConduitConnectionChanged);

            ConduitManager.AddConduitUpdater(ConduitUpdate);
            OnConduitConnectionChanged(null);

            OnConduitConnectionChanged(null);
        }