예제 #1
0
        public override bool SetProperty(string propertyName, string value, string[] source, ref int line)
        {
            switch (propertyName)
            {
            case "Loop Count":
                m_loopCount = Parser.ParseInt(value, line);
                break;

            case "Break Loop":
                m_breakLoop = Parser.ParseInt(value, line);
                break;

            case "Use Speaker Position":
                m_useSpeakerPosition = Parser.ParseInt(value, line);
                break;

            case "Use Center Speaker":
                m_useCentreSpeaker = Parser.ParseInt(value, line);
                break;

            case "New Speaker Position On Loop":
                m_newSpeakerPositionOnLoop = Parser.ParseInt(value, line);
                break;

            case "Speaker Position Angle":
                m_speakerPositionAngle = Parser.ParseFloat(value, line);
                break;

            case "Speaer Position Arc":                         // XACT typo, not mine!
            case "Speaker Position Arc":                        // In case they fix the typo
                m_speakerPositionArc = Parser.ParseFloat(value, line);
                break;

            case "Wave Entry":
                WaveEntry wave = new WaveEntry();
                wave.Parse(source, ref line, OwnerProject);
                m_waveEntries.Add(wave);
                break;

            case "Pitch Variation":
                m_pitchVariation = new PitchVariation();
                m_pitchVariation.Parse(source, ref line, OwnerProject);
                break;

            case "Volume Variation":
                m_volumeVariation = new VolumeVariation();
                m_volumeVariation.Parse(source, ref line, OwnerProject);
                break;

            case "Variation":
                m_variation = new Variation();
                m_variation.Parse(source, ref line, OwnerProject);
                break;

            default:
                return(base.SetProperty(propertyName, value, source, ref line));
            }

            return(true);
        }
예제 #2
0
파일: Event.cs 프로젝트: GlennSandoval/JSIL
		public override bool SetProperty( string propertyName, string value, string[] source, ref int line )
		{
			switch ( propertyName )
			{
				case "Loop Count":
					m_loopCount = Parser.ParseInt( value, line );
					break;

				case "Break Loop":
					m_breakLoop = Parser.ParseInt( value, line );
					break;

				case "Use Speaker Position":
					m_useSpeakerPosition = Parser.ParseInt( value, line );
					break;

				case "Use Center Speaker":
					m_useCentreSpeaker = Parser.ParseInt( value, line );
					break;

				case "New Speaker Position On Loop":
					m_newSpeakerPositionOnLoop = Parser.ParseInt( value, line );
					break;

				case "Speaker Position Angle":
					m_speakerPositionAngle = Parser.ParseFloat( value, line );
					break;

				case "Speaer Position Arc":		// XACT typo, not mine!
				case "Speaker Position Arc":	// In case they fix the typo
					m_speakerPositionArc = Parser.ParseFloat( value, line );
					break;

				case "Wave Entry":
					WaveEntry wave = new WaveEntry();
					wave.Parse( source, ref line, OwnerProject );
					m_waveEntries.Add( wave );
					break;

				case "Pitch Variation":
					m_pitchVariation = new PitchVariation();
					m_pitchVariation.Parse( source, ref line, OwnerProject );
					break;

				case "Volume Variation":
					m_volumeVariation = new VolumeVariation();
					m_volumeVariation.Parse( source, ref line, OwnerProject );
					break;

				case "Variation":
					m_variation = new Variation();
					m_variation.Parse( source, ref line, OwnerProject );
					break;

				default:
					return base.SetProperty( propertyName, value, source, ref line );
			}

			return true;
		}