예제 #1
0
 private void AddSample <T>(string path) where T : Sample
 {
     if (AllSamples.ContainsKey(path))
     {
         return;
     }
     AllSamples[path] = typeof(T);
     AllSamplesPath.Add(path);
 }
예제 #2
0
        public void BeginRenderSample(string sampleName)
        {
            if (AllSamples == null || !AllSamples.ContainsKey(sampleName))
            {
                return;
            }

            if (CurrentSample != null)
            {
                CurrentSample.OnExit();
            }

            CurrentSample = Activator.CreateInstance(AllSamples[sampleName]) as Sample;
            CurrentSample.OnInit();
        }