// Use this for initialization void Start() { mInstance = this; mBeatCount = 0; mBarCount = 0; mEvaluationTimes = 0; mIsEvaluationAllEnd = false; mIsEvaluationEnd = true; mIsFirstEvaluation = false; mBeatManager = SingletonBeatManager.GetInstance(); mBeatManager.AddObserver(this); mListObservers = new List <IObserver>(); mListEvaluationAttribute = new List <EvaluationAttribute> (); //通过迭代器读入数据 ReadEvaluationAttribute(); //记录哪个小节进行评价 mListEvaluationBar = new List <int> (); CalEvaluationBar(); //初始化标准动画队列 mQueueStdMotion = new Queue <MotionJointQuaternionVector>(); //初始化四元组 InitTransform(); InitQuaternionVector(); //算法 mActionMatchAlogrithm = new StaticMatch(mStdJointQuaternionVector, mUserJointQuaternionVector); }
public Observer(ISubject subject, string name, string gap) { this.subject = subject; this.name = name; this.gap = gap; subject.AddObserver(this); }
public Observer(ISubject subject, IRepository repository, int PatientId) { this.subject = subject; this.repository = repository; Patient = repository.GetPatientById(PatientId); subject.AddObserver(this); }
public Observer(ListBox display, ISubject subject) { this.display = display; this.subject = subject; // IMPORTANT subject.AddObserver(this); }
// Use this for initialization void Start() { mWaveHand = SingletonWaveHand.GetInstance(); mWaveHand.AddObserver(this); //mShoulderAngle=SingletonAngle.GetInstance(); //mShoulderAngle.AddObserver(this ); //arrShoulderAngle= new ShoulderAngle[2] ; }
public BicycleObserver(Label displayLabel, ISubject bicycleSubject) { this.displayLabel = displayLabel; RPM = 0; currentValue = 0; bicycleSubject.AddObserver(this); }
public Observer(ListBox display, ISubject subject) { this.display = display; this.subject = subject; temp = humidity = bPressure = 0; // IMPORTANT subject.AddObserver(this); }
public Observer(Label displayLabel, ISubject bikeSubject) { this.displayLabel = displayLabel; this.bikeSubject = bikeSubject; currentRPM = 0; currentComputedValue = 0; // IMPORTANT bikeSubject.AddObserver(this); }
/// <summary> /// Constructor - initialises the label responsible for displaying /// computed results, and the subject which will push information /// to the observers. /// </summary> /// <param name="displayLabel">The label to display computed results.</param> /// <param name="bikeSubject">The subject to push notifications to it's observers.</param> public BicycleObserver(Label displayLabel, ISubject bikeSubject) { this.displayLabel = displayLabel; this.bikeSubject = bikeSubject; currentRPM = 0; currentComputedValue = 0.0; ///<summary> ///Ensuring that the observer is added to the subject ///on creation. ///</summary> bikeSubject.AddObserver(this); }
// Use this for initialization void Start() { //订阅主题SingletonBeatManager mEffectsManager = SingletonBeatManager.GetInstance(); mEffectsManager.AddObserver(this); mEffectsIterator = SingletonGameData.GetInstance().CreateEffectIterator(); //加载特效属性,并排序 mArrayEffectAttribute = new EffectAttribute[mEffectsIterator.Count]; while (mEffectsIterator.HasNext()) { mArrayEffectAttribute[i] = (mEffectsIterator.Next()) as EffectAttribute; i++; } MySortClass mySortClass = new MySortClass(); Array.Sort(mArrayEffectAttribute, mySortClass); /*foreach (EffectAttribute effects in mArrayEffectAttribute){ * print (effects.BarNum+"dd" ); * print (effects .Beat+"cc"); * }*/ }
public WindowsMonitor(ISubject subject) { subject.AddObserver(this); }
public HomeSystem(ISubject weatherStation) { _weatherStation = weatherStation; _weatherStation.AddObserver(this); }
/// <summary> /// 实例化的时候,将其添加到主题 /// </summary> /// <param name="subject"></param> public Display3DisplayObserver(ISubject <WeatherData> subject) { subject.AddObserver(this); }
public SimpleMP3Display(ISubject nummer) { this.nummer = nummer; nummer.AddObserver(this); }
public Human(string name, ISubject sub) { this.name = name; sub.AddObserver(this); }
public SimpleMP3Display(ISubject player) { player.AddObserver(this); }
void Start() { mBeatManager = SingletonBeatManager.GetInstance(); mBeatManager.AddObserver(this); }
public Observer(ISubject subject) { subject.AddObserver(this); }
public CurrentConditionsView(ISubject subject) { _subject = subject; _subject.AddObserver(this); }
public StatisticDisplay(ISubject subject) { _subject = subject; subject.AddObserver(this); }
public WebMonitor(ISubject subject) { subject.AddObserver(this); }
public ForecastDisplay(ISubject subject) { _subject = subject; subject.AddObserver(this); }
public MobileMonitor(ISubject subject) { subject.AddObserver(this); }
public SimpleMP3Display(ISubject player) { this.mp3Player = player; mp3Player.AddObserver(this); }
public MES(ISubject weatherStation) { _weatherStation = weatherStation; _weatherStation.AddObserver(this); }
public CurrentWeatherScreen(ISubject weatherStation) { _weatherStation = weatherStation; weatherStation.AddObserver(this); }
public SimpleMP3Display(MP3Player player) { this.player = player; player.AddObserver(this); }
/// <summary> /// This constructor is passed the weatherData object (ISubject), /// and is used to register the display as an observer. /// </summary> /// <param name="weatherData"></param> public CurrentConditionsDisplay(ISubject weatherData) { this.weatherData = weatherData; weatherData.AddObserver(this); }
public Observer1(ISubject sub) { _sub = sub; _sub.AddObserver(this); }
public FancyMP3Display(MP3Player player) { this.player = player; player.AddObserver(this); }
public StatisticsWeatherScreen(ISubject weatherStation) { _weatherStation = weatherStation; _weatherStation.AddObserver(this); }
public FancyMP3Display(ISubject player) { this.player = player; player.AddObserver(this); }