Beispiel #1
0
 /*Metodo para instanciar una clase en unity*/
 private void Awake()
 {
     atomManager = FindObjectOfType <AtomManager>();
     loadTPer    = FindObjectOfType <LoadTper>();
     UIFader     = FindObjectOfType <UIFader>();
     // seteo el CanvasGroup (tabla periodica) que voy a ocultar cuando llame al UIFader.FadeInAndOut
     // UIFader.uiElement = parent.transform.parent.gameObject.GetComponent<CanvasGroup>();
     BasicInfoLoader  = FindObjectOfType <BasicInfoLoader>();
     DetailInfoLoader = FindObjectOfType <DetailInfoLoader>();
 }
Beispiel #2
0
 private void Awake()
 {
     atomManager       = FindObjectOfType <AtomManager>();
     moleculeManager   = FindObjectOfType <MoleculeManager>();
     materialManager   = FindObjectOfType <MaterialManager>();
     infoPanelElements = transform.Find("InfoContainerElementos").GetComponent <CanvasGroup>();
     infoPanelMolecule = transform.Find("InfoContainerMoleculas").GetComponent <CanvasGroup>();
     infoPanelMaterial = transform.Find("InfoContainerMateriales").GetComponent <CanvasGroup>();
     infoPanelIsotopos = transform.Find("InfoContainerIsotopos").GetComponent <CanvasGroup>();
 }
Beispiel #3
0
 private void Awake()
 {
     atomManager          = FindObjectOfType <AtomManager>();
     moleculeManager      = FindObjectOfType <MoleculeManager>();
     materialManager      = FindObjectOfType <MaterialManager>();
     populateMoleculeList = FindObjectOfType <PopulateMoleculeList>();
     positionManager      = PositionManager.Instance;
     savePath             = Application.dataPath + "/save.json";
     tempPath             = Application.dataPath + "/tmp.json";
 }
Beispiel #4
0
        private async void InitializeSDK()
        {
            if (String.IsNullOrEmpty(SecretKey))
            {
                Messages.ShowMessage(Messages.SecretKeyRquired);
                return;
            }

            IsSDKInitializing = true;

            var countries = new List <Country>();
            var protocols = new List <Protocol>();

            await Task.Factory.StartNew(() =>
            {
                //Can be initialized using this
                atomManagerInstance = AtomManager.Initialize(SecretKey);
                //Or this
                //var atomConfig = new AtomConfiguration(SecretKey);
                //atomManagerInstance = AtomManager.Initialize(atomConfig);

                atomManagerInstance.Connected                += AtomManagerInstance_Connected;
                atomManagerInstance.DialError                += AtomManagerInstance_DialError;
                atomManagerInstance.Disconnected             += AtomManagerInstance_Disconnected;
                atomManagerInstance.StateChanged             += AtomManagerInstance_StateChanged;
                atomManagerInstance.Redialing                += AtomManagerInstance_Redialing;
                atomManagerInstance.OnUnableToAccessInternet += AtomManagerInstance_OnUnableToAccessInternet;
                atomManagerInstance.SDKAlreadyInitialized    += AtomManagerInstance_SDKAlreadyInitialized;

                atomManagerInstance.AutoRedialOnConnectionDrop = true;

                //To get countries
                try
                {
                    countries = atomManagerInstance.GetCountries();
                }
                catch { }

                //To get protocols
                try
                {
                    protocols = atomManagerInstance.GetProtocols();
                }
                catch { }

                //AtomHelper lets you use the functionality of above created instance in all usercontrols and pages
                AtomHelper.SetAtomManagerInstance(atomManagerInstance);
            });

            ConnectionWithDedicatedIP.Initialize(protocols, countries);
            ConnectionWithParams.Initialize(protocols, countries);
            IsSDKInitializing    = false;
            ISSDKInitialized     = true;
            IsConnDisconnAllowed = true;
        }
Beispiel #5
0
 void Start()
 {
     this.turnNumber = 0;
     boardManager = new BoardManager(boardContainer, tileInstance);
     boardManager.buildBoard(8);
     initializeAtomInstances();
     atomManager = new AtomManager(ref boardManager.getBoardRef(), boardContainer);
     atomManager.addAtomTypes(atomInstances);
     atomManager.addGhostAtomTypes(ghostAtomInstances);
     atomManager.spawnInitialAtoms(8);
     atomManager.setupNextTurn();
 }
Beispiel #6
0
 void Awake()
 {
     atomManager     = FindObjectOfType <AtomManager>();
     DBManager       = FindObjectOfType <DBManager>();
     moleculeManager = FindObjectOfType <MoleculeManager>();
     //encuentro y asigno a mi lista los botones a apagar
     GameObject[] btns = GameObject.FindGameObjectsWithTag("toToggle");
     foreach (GameObject btn in btns)
     {
         buttonsToToggle.Add(btn.GetComponent <Button>());
     }
     combineButton.interactable = false;
 }
Beispiel #7
0
        public static void ConfitureSystem(string userName, string password)
        {
            AtomManagerInstance = AtomManager.Initialize("b12e0405d803ba771c46bb94be29a0a59f976b06");

            AtomManagerInstance.Connected    += AtomManagerInstance_Connected;
            AtomManagerInstance.DialError    += AtomManagerInstance_DialError;
            AtomManagerInstance.Disconnected += AtomManagerInstance_Disconnected;
            AtomManagerInstance.StateChanged += AtomManagerInstance_StateChanged;
            AtomManagerInstance.Redialing    += AtomManagerInstance_Redialing;

            VPNProperties vpnProperties = new VPNProperties(AtomManagerInstance.GetCountries()[0], AtomManagerInstance.GetProtocols()[0]);

            MainSettings.AtomManagerInstance.Credentials = new Credentials(userName, password);
            MainSettings.AtomManagerInstance.Connect(vpnProperties);
        }
Beispiel #8
0
 void Awake()
 {
     atomManager     = FindObjectOfType <AtomManager>();
     moleculeManager = FindObjectOfType <MoleculeManager>();
     materialManager = FindObjectOfType <MaterialManager>();
 }
Beispiel #9
0
        private async void InitializeSDK()
        {
            if (String.IsNullOrEmpty(SecretKey))
            {
                Messages.ShowMessage(Messages.SecretKeyRquired);
                return;
            }

            IsSDKInitializing = true;

            var countries = new List <Country>();
            var protocols = new List <Protocol>();

            await Task.Factory.StartNew(() =>
            {
                //Can be initialized using this
                atomManagerInstance = AtomManager.Initialize(SecretKey);
                //Or this
                //var atomConfig = new AtomConfiguration(SecretKey);
                //atomManagerInstance = AtomManager.Initialize(atomConfig);

                atomManagerInstance.Connected                += AtomManagerInstance_Connected;
                atomManagerInstance.DialError                += AtomManagerInstance_DialError;
                atomManagerInstance.Disconnected             += AtomManagerInstance_Disconnected;
                atomManagerInstance.StateChanged             += AtomManagerInstance_StateChanged;
                atomManagerInstance.Redialing                += AtomManagerInstance_Redialing;
                atomManagerInstance.OnUnableToAccessInternet += AtomManagerInstance_OnUnableToAccessInternet;
                atomManagerInstance.SDKAlreadyInitialized    += AtomManagerInstance_SDKAlreadyInitialized;
                atomManagerInstance.ConnectedLocation        += AtomManagerInstance_ConnectedLocation;
                atomManagerInstance.AtomInitialized          += AtomManagerInstance_AtomInitialized;
                atomManagerInstance.AtomDependenciesMissing  += AtomManagerInstance_AtomDependenciesMissing;

                // Add sensitive application that needs to be close if network connections drops automatically.
                atomManagerInstance.SensitiveApplications = new List <SensitiveApplication>()
                {
                    new SensitiveApplication()
                    {
                        CompleteExePath = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
                    }
                };

                atomManagerInstance.AutoRedialOnConnectionDrop = true;

                //To get countries
                try
                {
                    countries = atomManagerInstance.GetCountries();
                }
                catch { }

                //To get protocols
                try
                {
                    protocols = atomManagerInstance.GetProtocols();
                }
                catch { }

                //AtomHelper lets you use the functionality of above created instance in all usercontrols and pages
                AtomHelper.SetAtomManagerInstance(atomManagerInstance);
            });

            ConnectionWithDedicatedIP.Initialize(protocols, countries);
            ConnectionWithParams.Initialize(protocols, countries);
            IsSDKInitializing    = false;
            ISSDKInitialized     = true;
            IsConnDisconnAllowed = true;
        }
Beispiel #10
0
 /// <summary>
 /// Initializes a singleton of AtomManager
 /// </summary>
 /// <param name="secretKey">Key to be used for Initializing AtomManager instance</param>
 internal static void Initialize(string secretKey)
 {
     AtomManagerInstance = AtomManager.Initialize(secretKey);
 }
Beispiel #11
0
 /// <summary>
 /// Initializes a singleton of AtomManager
 /// </summary>
 /// <param name="atomConfiguration">Configuration settings for AtomManager instance</param>
 internal static void Initialize(AtomConfiguration atomConfiguration)
 {
     AtomManagerInstance = AtomManager.Initialize(atomConfiguration);
 }
Beispiel #12
0
 /// <summary>
 /// Sets the AtomManagerInstance property
 /// </summary>
 /// <param name="atomManager">An instance of AtomManager</param>
 internal static void SetAtomManagerInstance(AtomManager atomManager)
 {
     AtomManagerInstance = atomManager;
 }