Ejemplo n.º 1
0
 void FixedUpdate()
 {
     UnityEngine.Profiling.Profiler.BeginSample("Events");
     for (int i = 0; i < RunsPerUpdate; i++)
     {
         BasicColorEvent.Raise(new ColorEventData(Color.red));
     }
     UnityEngine.Profiling.Profiler.EndSample();
 }
Ejemplo n.º 2
0
 private void OnGUI()
 {
     GUI.Label(new Rect(180, 5, 200, 20), "Red");
     GUI.Label(new Rect(180, 20, 200, 20), "Green");
     GUI.Label(new Rect(180, 35, 200, 20), "Blue");
     red = GUI.HorizontalSlider(new Rect(10, 10, 150, 8), red, 0f, 1f);
     green = GUI.HorizontalSlider(new Rect(10, 25, 150, 8), green, 0f, 1f);
     blue = GUI.HorizontalSlider(new Rect(10, 40, 150, 8), blue, 0f, 1f);
     if (GUI.Button(new Rect(10, 75, 100, 22), "Send"))
     {
         BasicColorEvent.Raise(new ColorEventData(new Color(red,green,blue,1f)));
     }
 }
Ejemplo n.º 3
0
 private void OnDisable()
 {
     BasicColorEvent.RemoveListener(SetColor, Bone.Events.DefaultEventPriority.High);
 }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void OnEnable()
 {
     BasicColorEvent.AddListener(SetColor, Bone.Events.DefaultEventPriority.High);
 }