Esempio n. 1
0
 public override int GetHashCode()
 {
     return(Id.GetHashCode()
            ^ Name.GetHashCode()
            ^ IsLive.GetHashCode()
            ^ Odds.Aggregate(0, (acc, x) => acc ^ x.GetHashCode()));
 }
Esempio n. 2
0
 public bool Equals(BetModel other)
 {
     return(Id.Equals(other.Id) &&
            Name.Equals(other.Name) &&
            IsLive.Equals(other.IsLive) &&
            (Odds.Except(other.Odds, new GenericComparer <OddModel>()).Count() == 0));
 }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public async Task <IActionResult> OnPostAsync()
        {
            //write out setting
            _settings.UpdateSetting(new CustomSetting()
            {
                Name = "IsLive", Value = IsLive.ToString()
            });

            return(RedirectToPage("/Settings"));
        }
Esempio n. 4
0
    void Start()
    {
        //LLamo a la rutina de crear enemigos
        StartCoroutine(crearEnemigos());

        //LLamo a la rutina de crear coleccionables
        StartCoroutine(crearColeccionables());

        if (jugador == null)           //Si no se ha informado el Player busca un objeto con el Tag Playe.
        {
            jugador = GameObject.Find("Jugador");
        }

        live      = jugador.GetComponent <IsLive>(); //Recuperamos el script isLive del player y lo guardamos en una variable.
        gameState = gameStates.Playing;              //Cambiamos el estado a Playing.

        // Desactivamos el Canvas gameOver, just in case.
        gameOverCanvas.SetActive(false);
    }