Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M))
     {
         ik.enabled = true;
         //CharacterManager.instance.toggleInput();
         SingleDoor A = new SingleDoor();
         A.openDoor(interactionSystem, effectors, interactionObject);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Saves the list of accessories to a Comma-Separated Value file for later use if needed.
        /// </summary>
        private bool SaveAccessoryList()
        {
            // Temporary file for storing accessory data
            string fname = "AccessoryData.csv";

            // Check if output folder already exists
            string OutputPath = @"C:\ProgramData\Charbonneau Vendette Solutions\";

            if (!Directory.Exists(OutputPath))
            {
                Directory.CreateDirectory(OutputPath);
                Console.WriteLine("Creating new path {0}.", OutputPath);
            }

            // Create full path for file for storing accessory data
            filename = OutputPath + fname;


            try
            {
                using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename))
                {
                    Console.WriteLine("Writing to {0}.", filename);
                    file.WriteLine("BlackFloor,{0}", BlackFloor.ToString());
                    file.WriteLine("VarnishFloor,{0}", VarnishFloor.ToString());
                    file.WriteLine("TarFiller,{0}", TarFiller.ToString());
                    file.WriteLine("SpotLights,{0}", SpotLights.ToString());
                    file.WriteLine("Chandelier,{0}", Chandelier.ToString());
                    file.WriteLine("Cafe25,{0}", Cafe25.ToString());
                    file.WriteLine("Cafe50,{0}", Cafe50.ToString());
                    file.WriteLine("Cafe100,{0}", Cafe100.ToString());
                    file.WriteLine("Extension25,{0}", Extension25.ToString());
                    file.WriteLine("Extension50,{0}", Extension50.ToString());
                    file.WriteLine("Extension100,{0}", Extension100.ToString());
                    file.WriteLine("ExitSign,{0}", ExitSign.ToString());
                    file.WriteLine("SingleDoor,{0}", SingleDoor.ToString());
                    file.WriteLine("DoubleDoor,{0}", DoubleDoor.ToString());
                    file.WriteLine("FireExtinguisher,{0}", FireExtinguisher.ToString());
                    file.WriteLine("BlockCover,{0}", BlockCover.ToString());
                    file.WriteLine("Gutter10,{0}", Gutter10.ToString());
                    file.WriteLine("Gutter15,{0}", Gutter15.ToString());
                    file.WriteLine("Gutter20,{0}", Gutter20.ToString());
                }
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        public List <AbstractPart> GenerateParts(int height, int width, int depth, bool isLeftSingleDoor, bool isRightSingleDoor,
                                                 bool isDoubleDoor, int foundHeight, bool isSingleRoof,
                                                 bool isLeftRoof, bool isRightRoof, bool isMiddleRoof, bool isBackOpened, bool isLeftPanelOpened, bool isRightPanelOpened,
                                                 bool isMountedLeft, bool isMountedRight, bool isTopOpened, bool hasCircuitBreaker)
        {
            List <AbstractPart> parts = new List <AbstractPart>();

            //ЧЕЛНА КОЛОНА ЛЯВА
            frontSidePanel = new FrontSidePanel(height, isMountedLeft);
            parts.Add(frontSidePanel);

            //ЧЕЛНА КОЛОНА ДЯСНА
            frontSidePanel = new FrontSidePanel(height, isMountedRight);
            parts.Add(frontSidePanel);


            //КОЛОНА ЗАДНА ЛЯВА
            rearSidePanel = new RearSidePanel(height, width, depth, isMountedLeft, isLeftPanelOpened, isBackOpened);
            parts.Add(rearSidePanel);

            //КОЛОНА ЗАДНА ДЯСНА
            rearSidePanel = new RearSidePanel(height, width, depth, isMountedRight, isRightPanelOpened, isBackOpened);
            parts.Add(rearSidePanel);


            //РАЗПЪНКА, ПЕН ЕДИНИЧНА ЗА ШИНИ, ПЛАНКА МОДУЛИ
            for (int i = 0; i < 2; i++)
            {
                foundFixer  = new FoundFixer(depth);
                singlePen   = new SinglePen();
                moduleFixer = new ModuleFixer();

                parts.Add(foundFixer);
                parts.Add(singlePen);
                parts.Add(moduleFixer);
            }

            //ВИНКЕЛ ЗА МОНТАЖНА ПЛОЧА ЗА ТАБЛО С ГРЪБ
            if (!isBackOpened)
            {
                for (int i = 0; i < 2; i++)
                {
                    mpFixer = new MPFixer(width);
                    parts.Add(mpFixer);
                }
            }

            //ОСНОВА
            if (foundHeight > 0)
            {
                for (int i = 0; i < 2; i++)
                {
                    foundWidth = new FoundWidth(width, foundHeight);
                    foundDepth = new FoundDepth(depth, foundHeight);
                    parts.Add(foundDepth);
                    parts.Add(foundWidth);
                }
                foundCap = new FoundCap(depth);
                parts.Add(foundCap);
            }

            //ВРАТИ
            if (isLeftSingleDoor || isRightSingleDoor)
            {
                sd = new SingleDoor(width, height, isLeftSingleDoor);
                parts.Add(sd);

                for (int i = 0; i < 3; i++)
                {
                    additionalHorizontalDoorProfile = new AdditionalHorizontalDoorProfile(width);
                    parts.Add(additionalHorizontalDoorProfile);
                }

                for (int i = 0; i < 2; i++)
                {
                    additionalVerticalDoorProfile = new AdditionalVerticalDoorProfile(height);
                    parts.Add(additionalVerticalDoorProfile);
                }
            }
            else
            {
                ddl = new DoubleDoorLeft(width, height);
                ddr = new DoubleDoorRight(width, height);
                parts.Add(ddl);
                parts.Add(ddr);

                for (int i = 0; i < 6; i++)
                {
                    additionalHorizontalDoorProfile = new AdditionalHorizontalDoorProfile(width);
                    parts.Add(additionalHorizontalDoorProfile);
                }


                for (int i = 0; i < 4; i++)
                {
                    additionalVerticalDoorProfile = new AdditionalVerticalDoorProfile(height);
                    parts.Add(additionalVerticalDoorProfile);
                }
            }

            //ПЛАНКА АПАРАТУРА ШРАК 250А
            if (hasCircuitBreaker)
            {
                circuitBreakerMP = new CircuitBreakerMP();
                parts.Add(circuitBreakerMP);
            }

            //ТАВАН
            topPanel = new TopPanel(width, depth, isBackOpened, isTopOpened);
            parts.Add(topPanel);

            //ДЪНО
            botPanel = new BotPanel(width, depth, isBackOpened);
            parts.Add(botPanel);

            //ПОКРИВ
            if (isSingleRoof || isLeftRoof || isRightRoof || isMiddleRoof)
            {
                roofPanel = new RoofPanel(width, depth, isLeftRoof, isRightRoof, isMiddleRoof, isSingleRoof);
                parts.Add(roofPanel);

                for (int i = 0; i < 2; i++)
                {
                    roofFixer = new RoofFixer(depth);
                    parts.Add(roofFixer);
                }

                if (!isSingleRoof)
                {
                    connectingRoofPanel = new ConnectingRoofPanel(depth);
                    parts.Add(connectingRoofPanel);
                }
            }

            return(parts);
        }