예제 #1
0
 public CadastroViewModel()
 {
     navigationServices = new NavigationServices(); //nv tela
     dialogServices     = new DialogServices();     //iniciando servico de alerta
     apiService         = new APIService();
     dataService        = new DataService();
 }
예제 #2
0
    void Start()
    {
        this.player = GameObject.FindWithTag("PlayerOverworld");
        if (this.player == null)
        {
            Debug.LogError("Tag 'PlayerOverworld' not set up on player's overworld (or player doesn't exist).");
            this.enabled = false;
        }

        this.playerController = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
        if (this.playerController == null)
        {
            Debug.LogError("Script 'PlayerController' not set up on player's overworld (or tag 'Player' not set up on player).");
            this.enabled = false;
        }

        this.messageBox = new Rect((Screen.width - this.skin.box.fixedWidth) / MESSAGE_BOX_X_ALIGNMENT,
                                   (Screen.height - this.skin.box.fixedHeight) / MESSAGE_BOX_Y_ALIGNMENT,
                                   this.skin.box.fixedWidth, this.skin.box.fixedHeight);
        this.arrowBox = new Rect(this.messageBox.x + ARROW_X_POSITION, this.messageBox.y + ARROW_Y_POSITION,
                                 this.arrowImage.width, this.arrowImage.height);

        this.lines      = DialogServices.convertToLines(this.message, this.lineSize);
        this.lineIndex  = 0;
        this.showText   = false;
        this.arrowTimer = ARROW_SHIFT_DELAY;
        this.arrowOnTop = true;
        this.showArrow  = false;
    }
예제 #3
0
        public void MyTestInitialize()
        {
            this.kernel.Reset();
            this.kernel.Bind <CultureSettings>().ToSelf().InTransientScope();

            this.windowManagerMock = this.kernel.GetMock <IWindowManager>();
            this.dialogServices    = this.kernel.Get <DialogServices>();
        }
예제 #4
0
 public LoginViewModel()
 {
     navigationServices = new NavigationServices(); //nv tela
     dialogServices     = new DialogServices();     //iniciando servico de alerta
     Remenbered         = true;                     // lembrar senha marcado
     apiService         = new APIService();
     dataService        = new DataService();
 }
예제 #5
0
 void OnGUI()
 {
     if (showText)
     {
         GUI.skin = this.skin;
         GUI.Box(this.messageBox, DialogServices.getWrappedLines(this.lines, this.LINES_AMOUNT, this.lineIndex));
         shiftTheArrow();
     }
 }
예제 #6
0
 void Update()
 {
     if (DialogServices.canSpeak(this.transform, this.player.transform, MIN_DISTANCE, MAX_ANGLE))
     {
         if (Input.GetButtonDown(INPUT_KEY))
         {
             look();
             if (this.showText)
             {
                 this.lineIndex += this.LINES_AMOUNT;
                 if (this.lineIndex >= this.lines.Length)
                 {
                     disableDialog();
                 }
             }
             else
             {
                 enableDialog();
             }
         }
     }
 }
예제 #7
0
 public MainViewModel()
 {
     instance           = this;
     Menu               = new ObservableCollection <MenuItemViewModel>();
     Cardapios          = new ObservableCollection <CardapioItemViewModel>();
     Cardapios2         = new ObservableCollection <CardapioItemViewModel>();
     Barracas           = new ObservableCollection <BarracaItemViewModel>();
     ListRank           = new ObservableCollection <MediaAvaliacao>();
     CurrentCardapio    = new CardapioItemViewModel();
     CurrentBarraca     = new BarracaItemViewModel();
     apiService         = new APIService();
     dataService        = new DataService();
     AvaliacaoRequest   = new AvaliacaoRequest();
     dialogServices     = new DialogServices();
     navigationServices = new NavigationServices();
     navigationXamarin  = new NavigationXamarin();
     conexao            = new Conexao();
     LoadMenu();
     ValidaToken();
     LoadCardapio();
     LoadBarraca();
     LoadRank();
 }
예제 #8
0
 public RecuperarViewModel()
 {
     navigationServices = new NavigationServices(); //nv tela
     dialogServices     = new DialogServices();     //iniciando servico de alerta
     apiService         = new APIService();
 }