コード例 #1
0
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_CUBE_TYPE":
                    properties.cubeType = (CubeType)property.GetInt32();
                    break;
                case "ITEM_PROPERTY_DROPPER_ENABLED":
                    properties.dropperVisible = property.GetBool();
                    break;
                case "ITEM_PROPERTY_AUTO_DROP_CUBE":
                    properties.autoDrop = property.GetBool();
                    break;
                case "ITEM_PROPERTY_AUTO_RESPAWN_CUBE":
                    properties.autoRespawn = property.GetBool();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #2
0
ファイル: Barrier.cs プロジェクト: Kyle0654/Portal2.Puzzle
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_BARRIER_TYPE":
                    BarrierType = (BarrierType)property.GetInt32();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #3
0
ファイル: Item.cs プロジェクト: Kyle0654/Portal2.Puzzle
        /// <summary>
        /// Reads a property that wasn't one of the default item properties.
        /// </summary>
        internal virtual void ReadProperty(P2CProperty property)
        {
            if (properties == null)
                return;

            properties.Add(new KeyValuePair<string, string>(property.Key, property.Value));
        }
コード例 #4
0
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_TIMER_DELAY":
                    timerDelay = property.GetInt32();
                    break;
                case "ITEM_PROPERTY_TIMER_SOUND":
                    timerSound = property.GetInt32();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #5
0
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_CONNECTION_COUNT":
                    // Probably nothing to do here, except maybe verify the connection count matches connections.
                    break;
                case "ITEM_PROPERTY_ANGLED_PANEL_TYPE":
                    ExtendAngle = (AngledPanelExtendAngle)property.GetInt32();
                    break;
                case "ITEM_PROPERTY_START_DEPLOYED":
                    StartDeployed = property.GetBool();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #6
0
ファイル: Paint.cs プロジェクト: Kyle0654/Portal2.Puzzle
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_PAINT_TYPE":
                    properties.paintType = (PaintType)property.GetInt32();
                    break;
                case "ITEM_PROPERTY_DROPPER_ENABLED":
                    properties.dropperVisible = property.GetBool();
                    break;
                case "ITEM_PROPERTY_FLOW_TYPE":
                    properties.flowType = (PaintFlowType)property.GetInt32();
                    break;
                case "ITEM_PROPERTY_ALLOW_STREAK_PAINT":
                    properties.allowStreaks = property.GetBool();
                    break;
                case "ITEM_PROPERTY_START_ENABLED":
                    properties.startEnabled = property.GetBool();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #7
0
        internal override void ReadProperty(P2CProperty property)
        {
            switch (property.Key)
            {
                case "ITEM_PROPERTY_CONNECTION_COUNT":
                    // Probably nothing to do here, except maybe verify the connection count matches connections.
                    break;
                case "ITEM_PROPERTY_START_ENABLED":
                    StartEnabled = property.GetBool();
                    break;
            }

            base.ReadProperty(property);
        }
コード例 #8
0
ファイル: Button.cs プロジェクト: Kyle0654/Portal2.Puzzle
        internal override void ReadProperty(P2CProperty property)
        {
            if (property.Key == "ITEM_PROPERTY_BUTTON_TYPE")
            {
                ButtonType = (ButtonType)property.GetInt32();
            }

            base.ReadProperty(property);
        }