Пример #1
0
 public static void SetActive <T, P, K, V>(this Entity self, bool active, T param1, P param2, K param3, V param4)
 {
     if (active)
     {
         UIEventSystem.Instance.OnEnable(self, param1, param2, param3, param4);
         self.AfterOnEnable();
         Game.EventSystem.Publish(new UIEventType.SetActive()
         {
             entity = self, Active = active
         });
     }
     else
     {
         Game.EventSystem.Publish(new UIEventType.SetActive()
         {
             entity = self, Active = active
         });
         self.BeforeOnDisable();
         UIEventSystem.Instance.OnDisable(self, param1, param2, param3, param4);
     }
 }
Пример #2
0
 public static void SetActive(this Entity self, bool active)
 {
     if (active)
     {
         UIEventSystem.Instance.OnEnable(self);
         self.AfterOnEnable();
         Game.EventSystem.Publish(new UIEventType.SetActive()
         {
             entity = self, Active = active
         });
     }
     else
     {
         Game.EventSystem.Publish(new UIEventType.SetActive()
         {
             entity = self, Active = active
         });
         self.BeforeOnDisable();
         UIEventSystem.Instance.OnDisable(self);
     }
 }