Exemplo n.º 1
0
 private void ClearAll()
 {
     if (FabricManager.IsInitialised())
     {
         EventListener[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <EventListener>();
         for (int i = 0; i < componentsInChildren.Length; i++)
         {
             componentsInChildren[i]._eventName = "_UnSet_";
         }
     }
     new List <GameObject>();
     Object[] array = Object.FindObjectsOfType(typeof(GameObject));
     for (int j = 0; j < array.Length; j++)
     {
         GameObject gameObject = (GameObject)array[j];
         if (gameObject.transform.parent == null)
         {
             EventTrigger[] componentsInChildren2 = gameObject.GetComponentsInChildren <EventTrigger>();
             for (int k = 0; k < componentsInChildren2.Length; k++)
             {
                 componentsInChildren2[k]._eventName = "_UnSet_";
             }
         }
     }
     this.ClearEventList();
 }
Exemplo n.º 2
0
 public ControlClientes()
 {
     InitializeComponent();
     manager = FabricManager.Clientes(@"C:\GestorCyF");
     dtg     = new DataGrid();
     CargarDatosIniciales();
 }
Exemplo n.º 3
0
 public static void RenameEvent(string eventName, string newEventName)
 {
     if (FabricManager.IsInitialised())
     {
         EventListener[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <EventListener>();
         for (int i = 0; i < componentsInChildren.Length; i++)
         {
             if (componentsInChildren[i]._eventName == eventName)
             {
                 componentsInChildren[i]._eventName = newEventName;
             }
         }
     }
     new List <GameObject>();
     Object[] array = Object.FindObjectsOfType(typeof(GameObject));
     for (int j = 0; j < array.Length; j++)
     {
         GameObject gameObject = (GameObject)array[j];
         if (gameObject.transform.parent == null)
         {
             EventTrigger[] componentsInChildren2 = gameObject.GetComponentsInChildren <EventTrigger>();
             for (int k = 0; k < componentsInChildren2.Length; k++)
             {
                 if (componentsInChildren2[k]._eventName == eventName)
                 {
                     componentsInChildren2[k]._eventName = newEventName;
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
    private void Start()
    {
        FabricManager instance = FabricManager.Instance;

        if (instance != null)
        {
            FabricManager.Instance._audioListener = base.gameObject.AddComponent <AudioListener>();
        }
    }
Exemplo n.º 5
0
 public static FabricManager Instance()
 {
     if (fabricManager != null)
     {
         return(fabricManager);
     }
     if (FabricManager.Instance != null)
     {
         fabricManager = FabricManager.Instance;
     }
     else
     {
         fabricManager = (FabricManager)Object.FindObjectOfType(typeof(FabricManager));
     }
     return(fabricManager);
 }
Exemplo n.º 6
0
    private void DrawComponents()
    {
        if (!FabricManager.IsInitialised())
        {
            return;
        }
        float value = slotHeight + 500f;

        scrollPosition = GUI.BeginScrollView(new Rect(0f, 0f, 700f, GetActualSize(value) + 20f), scrollPosition, new Rect(0f, 0f, width, GetActualSize(value)));
        Fabric.Component[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <GroupComponent>();
        float y = 20f;
        float x = 20f;

        foreach (Fabric.Component component in componentsInChildren)
        {
            if (component != null)
            {
                DrawComponent(component, ref x, y);
            }
        }
        width = x;
        GUI.EndScrollView();
    }
 public void Awake()
 {
     if (_isInitialised)
     {
         return;
     }
     _instance = this;
     if (_VRAudioManager.HasVRSolutions())
     {
         FabricAudioListener fabricAudioListener = (FabricAudioListener)UnityEngine.Object.FindObjectOfType(typeof(FabricAudioListener));
         if (fabricAudioListener != null)
         {
             GameObject audioListener = _VRAudioManager.GetAudioListener();
             if (audioListener != null)
             {
                 audioListener.transform.parent = fabricAudioListener.gameObject.transform;
             }
         }
         if (_audioSourcePool == 0)
         {
             _audioSourcePool = 100;
         }
     }
     if (_audioSourcePool > 0)
     {
         if (_audioSourcePoolManager == null)
         {
             _audioSourcePoolManager = base.gameObject.GetComponentInChildren <AudioSourcePool>();
             if (_audioSourcePoolManager == null)
             {
                 _audioSourcePoolManager = AudioSourcePool.Create();
             }
             _audioSourcePoolManager.Initialise(_audioSourcePool, _audioSourcePoolFadeInTime, _audioSourcePoolFadeOutTime);
         }
         if (_audioSourcePoolManager != null)
         {
             _audioSourcePoolManager.Refresh();
         }
     }
     InitialiseComponents();
     RefreshComponents();
     if (_dontDestroyOnLoad)
     {
         if (Application.isPlaying)
         {
             UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
         }
         DebugLog.Print("FabricManager initialised (DontDestroyOnLoad flag enabled)");
     }
     else
     {
         DebugLog.Print("FabricManager initialised (DontDestroyOnLoad flag disabled)");
     }
     if (Application.isEditor)
     {
         CodeProfiler.enabled = true;
         FabricManager[] array = UnityEngine.Object.FindObjectsOfType(typeof(FabricManager)) as FabricManager[];
         if (array.Length > 1)
         {
             DebugLog.Print("More than two FabricManager instances available!!!", DebugLevel.Error);
         }
     }
     for (int i = 0; i < _musicTimeSignatures.Count; i++)
     {
         _musicTimeSignatures[i].Init();
     }
     _isInitialised = true;
 }
 public void OnDestroy()
 {
     _instance = null;
 }
Exemplo n.º 9
0
 public Login()
 {
     InitializeComponent();
     manager = FabricManager.UsuariosManager(FabricManager.OrigenesDeDatos.SQLServer);
 }