Esempio n. 1
0
    public void clickPlaceSinkButton()
    {
        Debug.Log("clickPlaceBedButton", gameObject);

        buttonFlag = FurnitureFlag.SINK;
        //InvokeRepeating("PlaceBed", 0f, 0.01f);
    }
Esempio n. 2
0
    public void clickEraseButton()
    {
        Debug.Log("clickEraseBedButton", gameObject);

        buttonFlag = FurnitureFlag.ERASER;
        //InvokeRepeating("EraseBed", 0f, 0.01f);
    }
Esempio n. 3
0
    public void clickPlaceToiletButton()
    {
        Debug.Log("clickPlaceBedButton", gameObject);

        buttonFlag = FurnitureFlag.TOILET;
        //InvokeRepeating("PlaceBed", 0f, 0.01f);
    }
Esempio n. 4
0
    public void clickDoneButton()
    {
        Debug.Log("clickDoneButton", gameObject);

        buttonFlag = FurnitureFlag.DESELECT;

        foreach (Transform iter in transform)
        {
            iter.GetComponent <Furniture>().setState("INACTIVE");
        }
        //CancelInvoke("PlaceBed");
    }
        /// <summary>
        /// Sets the Values array of <paramref name="outObj"/> based on input values from <paramref name="splitLine"/> appropriate where object type is Wand or Staff
        /// </summary>
        /// <returns><c>true</c> if values were set without errors, <c>false</c> otherwise. Errors are logged within this method.</returns>
        /// <param name="splitLine">Array of values to parse</param>
        /// <param name="outObj">Object whose Values property should be set</param>
        /// <param name="areaFile">Filename of the area file being parsed, used for error messages</param>
        /// <param name="lineNum">Line number the values came from, used for error messages</param>
        private static bool SetFurnitureValues(string[] splitLine, ObjectPrototypeData outObj, string areaFile, int lineNum)
        {
            // All segments should be parsed as ints
            SetValue_Int(splitLine[0], ref outObj.Values[0], "furniture", areaFile, lineNum, outObj.VNUM);
            SetValue_Int(splitLine[1], ref outObj.Values[1], "furniture", areaFile, lineNum, outObj.VNUM);

            // Segment 3, wear flag
            try
            {
                FurnitureFlag furnFlags = (FurnitureFlag)AlphaConversions.ConvertROMAlphaToInt32(splitLine[2]);
                outObj.Values[2] = furnFlags;
            }
            catch (ArgumentException e)
            {
                // Invalid extra flags
                throw new ObjectParsingException(String.Format("Error parsing furniture flags for object {0} in area {1}: invalid furniture flag value \"{2}\" found on line {3}", outObj.VNUM, areaFile, splitLine[2], lineNum), e);
            }

            SetValue_Int(splitLine[3], ref outObj.Values[3], "furniture", areaFile, lineNum, outObj.VNUM);
            SetValue_Int(splitLine[4], ref outObj.Values[4], "furniture", areaFile, lineNum, outObj.VNUM);

            return(true);
        }