コード例 #1
0
ファイル: ForceFeedback.cs プロジェクト: lodossDev/xnamugen
 public ForceFeedback(StateSystem statesystem, String label, TextSection textsection)
     : base(statesystem, label, textsection)
 {
     m_rumbletype = textsection.GetAttribute<ForceFeedbackType>("waveform", ForceFeedbackType.Sine);
     m_time = textsection.GetAttribute<Evaluation.Expression>("time", null);
     m_freq = textsection.GetAttribute<Evaluation.Expression>("freq", null);
     m_ampl = textsection.GetAttribute<Evaluation.Expression>("ampl", null);
     m_self = textsection.GetAttribute<Evaluation.Expression>("self", null);
 }
コード例 #2
0
ファイル: StringConverter.cs プロジェクト: xubingyue/xnamugen
        Object ToForceFeedbackType(String s)
        {
            ForceFeedbackType fft = ForceFeedbackType.None;

            if (s.IndexOf("sine", StringComparison.OrdinalIgnoreCase) != -1)
            {
                fft |= ForceFeedbackType.Sine;
            }
            if (s.IndexOf("square", StringComparison.OrdinalIgnoreCase) != -1)
            {
                fft |= ForceFeedbackType.Square;
            }

            return(fft);
        }