Inheritance: MonoBehaviour
 public void CheckGame(ModalWindowManager window)
 {
     if (player1Name.text.Length <= 0)
     {
         response.text  = "Le joueur 1 n'a pas saisi de nom";
         response.color = Color.green;
     }
     else if (player2Name.text.Length <= 0)
     {
         response.text  = "Le joueur 2 n'a pas saisi de nom";
         response.color = Color.green;
     }
     else if (player1Name.text.Equals(player2Name.text))
     {
         response.text  = "Les joueurs ne peuvent pas avoir les mêmes noms";
         response.color = Color.green;
     }
     else if (player1Color.index.Equals(player2Color.index))
     {
         response.text  = "Les joueurs ne peuvent pas avoir les mêmes couleurs";
         response.color = Color.green;
     }
     else
     {
         window.OpenWindow();
     }
 }
示例#2
0
        public SetBaudrateViewModel(
            ModalWindowManager modalWindowManager,
            IAppConfigService appConfigService)
        {
            _modalWindowManager = modalWindowManager;
            _appConfigService   = appConfigService;

            BaudrateList = new ObservableCollection <string>
            {
                "10",
                "20",
                "50",
                "100",
                "125",
                "250",
                "500",
                "800",
                "1000"
            };

            ApplyBaudrateCmd = ReactiveCommand.Create(() =>
            {
                _appConfigService.Config.Baudrate = SelectedBaudrate;
                MessageBus.Current.SendMessage <ModalActions>(ModalActions.Close);
            });
        }
示例#3
0
            // Use this for initialization
            void Start()
            {
                //inspector = gameObject.GetComponent ("VoxemeInspector") as VoxemeInspector;
                relationTracker = GameObject.Find("BehaviorController").GetComponent <RelationTracker>();
                windowManager   = gameObject.GetComponent <ModalWindowManager>();

                editableVoxemes = (PlayerPrefs.GetInt("Make Voxemes Editable") == 1);
            }
示例#4
0
        private void OpenModal(ModalWindowManager modalWindow, string title, string message)
        {
            modalWindow.CloseWindow();

            modalWindow.titleText = title;

            modalWindow.descriptionText = message;

            modalWindow.UpdateUI();
            modalWindow.OpenWindow();
        }
示例#5
0
 // Start is called before the first frame update
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
示例#6
0
            private void OnEnable()
            {
                help             = GameObject.Find("Help").GetComponent <HelpModalWindow>();
                inputController  = GameObject.Find("IOController").GetComponent <InputController>();
                outputController = GameObject.Find("IOController").GetComponent <OutputController>();
                windowManager    = GameObject.Find("VoxWorld").GetComponent <ModalWindowManager>();
                buttonManager    = GameObject.Find("VoxWorld").GetComponent <UIButtonManager>();

                if (cursorToggleAllowed)
                {
                    Screen.lockCursor = false;
                    Cursor.visible    = true;
                }
            }
示例#7
0
                void Awake()
                {
                    Draw = true;

#if UNITY_IOS
                    Screen.SetResolution(1280, 960, true);
                    Debug.Log(Screen.currentResolution);
#endif

                    fontSizeModifier = (fontSize / defaultFontSize);

                    windowManager            = GameObject.Find("VoxWorld").GetComponent <ModalWindowManager>();
                    buttonManager            = GameObject.Find("VoxWorld").GetComponent <UIButtonManager>();
                    buttonManager.windowPort = new Rect(bgLeft, bgTop, bgWidth, bgHeight);
                }
        public MainWindowViewModel(
            NotificationViewModel notificationViewModel,
            SetupViewModel setupMenuViewModel,
            CommandsViewModel commandsViewModel,
            MainViewModel mainViewViewModel,
            IAppConfigService appConfigService,
            ModalWindowManager modalWindowManager)
        {
            SetupMenuViewModel = setupMenuViewModel;
            CommandsViewModel  = commandsViewModel;
            Notification       = notificationViewModel;
            MainViewViewModel  = mainViewViewModel;
            AppConfigService   = appConfigService;
            ModalWindowManager = modalWindowManager;

            Content = MainViewViewModel;
        }
示例#9
0
        public SetPortViewModel(
            ModalWindowManager modalWindowManager,
            IAppConfigService appConfigService)
        {
            _modalWindowManager = modalWindowManager;
            _appConfigService   = appConfigService;

            RefreshPortList = ReactiveCommand.Create(() =>
            {
                PortList?.Clear();
                PortList = new ObservableCollection <string>(SerialPort.GetPortNames());
            });

            AppyPort = ReactiveCommand.Create(() =>
            {
                _appConfigService.Config.Port = SelectedPort;
                MessageBus.Current.SendMessage <ModalActions>(ModalActions.Close);
            });

            RefreshPortList.Execute().Subscribe();
        }
示例#10
0
                // Use this for initialization
                protected virtual void Start()
                {
                    windowManager = GameObject.Find("VoxWorld").GetComponent <ModalWindowManager>();

                    id = windowManager.windowManager.Count;

                    if (!windowManager.windowManager.ContainsKey(id))
                    {
                        windowManager.RegisterWindow(this);
                    }
                    else
                    {
                        Debug.Log("ModalWindow of id " + id + " already exists on this object!");
                        Destroy(this);
                    }

                    if (autoOpen)
                    {
                        Render = true;
                    }
                }
示例#11
0
        public SetupViewModel(
            IDialogManager dialogManager,
            IAppConfigService appConfigService,
            ModalWindowManager modalWindowManager)
        {
            _dialogManager      = dialogManager;
            AppConfigService    = appConfigService;
            _modalWindowManager = modalWindowManager;

            SetWireSharkFolderCmd = ReactiveCommand.CreateFromTask(async() =>
            {
                AppConfigService.Config.WiresharkPath = await _dialogManager.ShowFolderDialog();
            });

            SetPortCmd = ReactiveCommand.Create(() =>
            {
                _modalWindowManager.ShowModalFor <SetPortViewModel>();
            });

            SetBaudrateCmd = ReactiveCommand.Create(() =>
            {
                _modalWindowManager.ShowModalFor <SetBaudrateViewModel>();
            });
        }
示例#12
0
    // Use this for initialization
    protected virtual void Start()
    {
        windowManager = gameObject.GetComponent<ModalWindowManager> ();

        if (!windowManager.windowManager.ContainsKey (id)) {
            windowManager.RegisterWindow (this);
        }
        else {
            Debug.Log ("ModalWindow of id " + id.ToString () + "already exists on this object!");
            Destroy(this);
        }
    }
    void Start()
    {
        modalWindowSCR = GameObject.FindGameObjectWithTag("ModalWindowManager").GetComponent<ModalWindowManager>();
        tooltipParent = GameObject.FindGameObjectWithTag ("ItemTooltipPanel").GetComponent<RectTransform> ();
        tooltip = tooltipParent.GetChild (0).GetComponent<RectTransform>();
        for (int i = 0; i < 8; i++)
        {
            shopInventory.Add(databaseSCR.GetItem(0));
        }
        for (int i = 0; i < 8; i++)
        {

            shopInventoryStacks.Add(0);

        }
        addItemResult = AddItem(3, 1);
        addItemResult = AddItem(6, 1);
    }
 private void Awake()
 {
     instance = this;
 }
 // Initialise l'inventaire
 // Remplit l'inventaire d'objets vides
 void Start()
 {
     tooltipParent = GameObject.FindGameObjectWithTag ("ItemTooltipPanel").GetComponent<RectTransform> ();
     tooltip = tooltipParent.GetChild (0).GetComponent<RectTransform>();
     itemHeroSelection = itemHeroSelectionParent.GetChild (0).GetComponent<RectTransform>();
     modalWindowSCR = GameObject.FindGameObjectWithTag("ModalWindowManager").GetComponent<ModalWindowManager>();
     shopManagerSCR = GameObject.FindGameObjectWithTag("ShopManager").GetComponent<ShopManager>();
     for (int i = 0; i < inventorySize; i++)
     {
         inventory.Add(databaseSCR.GetItem(0));
     }
     for (int i = 0; i < inventory.Count; i++)
     {
         inventoryStacks.Add(0);
     }
 }
    private void OnEnable()
    {
        initialPosition = transform.position;
        initialRotation = transform.eulerAngles;

        help = GameObject.Find ("Help").GetComponent<Help> ();
        inputController = GameObject.Find ("IOController").GetComponent<InputController> ();
        outputController = GameObject.Find ("IOController").GetComponent<OutputController> ();
        inspector = GameObject.Find ("BlocksWorld").GetComponent<VoxemeInspector> ();
        windowManager = GameObject.Find ("BlocksWorld").GetComponent<ModalWindowManager> ();

        if (cursorToggleAllowed)
        {
            Screen.lockCursor = false;
            Cursor.visible = true;
        }
    }
 void Start()
 {
     teamManagerSCR = GameObject.FindGameObjectWithTag("TeamManager").GetComponent<TeamManager>();						// pour la gestion de team
     globalManagerSCR = GameObject.FindGameObjectWithTag("GlobalManager").GetComponent<GlobalManager>(); 				// pour la limite du nombre de hero
     moneyManager = GameObject.FindGameObjectWithTag ("MoneyManager").GetComponent<MoneyManager> ();						// pour le prix du hero (outcome)
     ModalWindowManagerSCR = GameObject.FindGameObjectWithTag("ModalWindowManager").GetComponent<ModalWindowManager>();	// pour la demande de suppression de hero
     inventorySCR = GameObject.FindGameObjectWithTag("Inventory").GetComponent<Inventory>();								// pour la suppression de hero
     if(heroStatsSCR.heroStatus == 0	)																					// Si le hero est en attente d'achat
     {
         StartCoroutine(DisplayHeroCoroutine());																			// fais afficher le hero dans le panel mercenary																			// ajoute le hero au nombre de heros actifs
     }
     else if(heroStatsSCR.heroStatus == 1)																				// Si le hero est actif et en vie
     {
         globalManagerSCR.numberOfHeroes ++;																				// ajoute le hero au nombre de heros actifs
         HeroDisplayManagerSCR.DisplayInPanelRight();																	// Affiche le hero dans le panel right
         HeroDisplayManagerSCR.DisplayInPanelPantheon();																	// Affiche le hero dans le panel Pantheon
         HeroDisplayManagerSCR.DisplayInItemHeroSelection();																// Affiche le hero dans le panel d'inventaire
         if(heroStatsSCR.heroHp < heroStatsSCR.heroMaxHp)					// Si les hp ne sont pax maxés
         {
             HeroDisplayManagerSCR.DisplayInNursery ();						// Cree un panel dans l'infirmerie
         }
     }
     else if(heroStatsSCR.heroStatus == 2)
     {
         HeroDisplayManagerSCR.DisplayInPanelPantheon();																	// Affiche le hero dans le panel Pantheon
         HeroDisplayManagerSCR.DisplayInGraveyard();																		// Affiche le hero dans le cimetiere
     }
 }
示例#18
0
 public virtual void Start()
 {
     windowManager = GetComponent <ModalWindowManager>();
 }
示例#19
0
 private void Start()
 {
     modalWindowManager = FindObjectOfType <ModalWindowManager>();
 }