Ejemplo n.º 1
0
        public override void Initialize()
        {
            if (PowerManager == null)
            {
                PowerManager = gameObject.AddComponent <AlterraGenPowerManager>();
            }

            if (ColorManager == null)
            {
                ColorManager = gameObject.AddComponent <ColorManager>();
                ColorManager.Initialize(gameObject, AlterraGenBuildable.BodyMaterial);
            }

            if (AnimationManager == null)
            {
                AnimationManager = gameObject.AddComponent <AnimationManager>();
            }

            if (DumpContainer == null)
            {
                DumpContainer = gameObject.AddComponent <DumpContainer>();
                DumpContainer.Initialize(transform, "AlterraGen Receptacle", AlterraGenBuildable.NotAllowedItem(), AlterraGenBuildable.StorageFullMessage(), PowerManager, 3, 3);
            }

            if (_fcsConnectableDevice == null)
            {
                _fcsConnectableDevice = gameObject.AddComponent <FCSConnectableDevice>();
                _fcsConnectableDevice.Initialize(this, PowerManager, PowerManager);
                FCSTechFabricator.FcTechFabricatorService.PublicAPI.RegisterDevice(_fcsConnectableDevice, GetPrefabID(), Mod.ModTabID);
            }


            if (DisplayManager == null)
            {
                DisplayManager = gameObject.AddComponent <AlterraGenDisplayManager>();
                DisplayManager.Setup(this);
            }

            _xBubbles = GameObjectHelpers.FindGameObject(gameObject, "xBubbles");

            IsInitialized = true;
        }
Ejemplo n.º 2
0
        public override void Initialize()
        {
            if (PowerManager == null)
            {
                PowerManager = gameObject.AddComponent <AlterraGenPowerManager>();
            }

            if (ColorManager == null)
            {
                ColorManager = gameObject.AddComponent <ColorManager>();
                ColorManager.Initialize(gameObject, AlterraGenBuildable.BodyMaterial);
            }

            if (AnimationManager == null)
            {
                AnimationManager = gameObject.AddComponent <AnimationManager>();
            }

            if (DumpContainer == null)
            {
                DumpContainer = gameObject.AddComponent <DumpContainer>();
                DumpContainer.Initialize(transform, "AlterraGen Receptacle", "", AlterraGenBuildable.NotAllowedItem(), PowerManager);
            }

            if (_fcsConnectableDevice == null)
            {
                _fcsConnectableDevice = gameObject.AddComponent <FCSConnectableDevice>();
                _fcsConnectableDevice.Initialize(this, PowerManager, PowerManager);
            }


            if (DisplayManager == null)
            {
                DisplayManager = gameObject.AddComponent <AlterraGenDisplayManager>();
                DisplayManager.Setup(this);
            }

            _xBubbles = GameObjectHelpers.FindGameObject(gameObject, "xBubbles");

            IsInitialized = true;
        }