private void Start() { gm = FindObjectOfType <GameManager>().GetComponent <GameManager>(); rb = GetComponent <Rigidbody>(); rb.constraints = RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; go = gameObject; go.name = "Zombie"; int numColor = Random.Range(0, 3); switch (numColor) { case 0: go.GetComponent <Renderer>().material.color = Color.cyan; break; case 1: go.GetComponent <Renderer>().material.color = Color.magenta; break; case 2: go.GetComponent <Renderer>().material.color = Color.green; break; } gusto = (Gusto)Random.Range(0, 5); gz.gustoZombie = gusto; }
public Gusto GetGusto(int id) { using (var db = new EmpanadasContext()) { Gusto gusto = db.Gustos.Find(id); return(gusto); } }
public Fruta(float valor, Gusto gusto, ConsoleColor color) : base(valor, gusto) { this.color = color; }
public ReinoVegetal(float valor, Gusto gusto) { this.valor = valor; this.gusto = gusto; }
public ReinoVegetal(Gusto gusto) : this(calcularValor.Next(1, 100), gusto) { }
public Carnibora(float valor, Gusto gusto, Captura tipo, int tamanio) : this(valor, gusto, tipo) { // Completar this.tamanio = tamanio; }
public Carnibora(float valor, Gusto gusto, Captura tipo) : base(valor, gusto) { // Completar this.tipo = tipo; //falta tamaño }
public Verdura(float valor, Gusto gusto, TipoVerdura tipo) : base(valor, gusto) { this.tipo = tipo; }
public Carnibora(float valor, Gusto gusto, Captura tipo) : base(valor, gusto) { this.tipo = tipo; }
public ReinoVegetal(Gusto gusto) { this.valor = calcularValor.Next(1, 100); }
public ReinoVegetal(float valor, Gusto gusto) : this(gusto) { this.valor = valor; }
public ReinoVegetal(Gusto gusto) { //this.valor = calcularValor.Next(1, 100); this.gusto = gusto; }