예제 #1
0
            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;
            }
예제 #2
0
 public Gusto GetGusto(int id)
 {
     using (var db = new EmpanadasContext())
     {
         Gusto gusto = db.Gustos.Find(id);
         return(gusto);
     }
 }
예제 #3
0
파일: Fruta.cs 프로젝트: MorenoDaniela/Lab2
 public Fruta(float valor, Gusto gusto, ConsoleColor color)
     : base(valor, gusto)
 {
     this.color = color;
 }
예제 #4
0
 public ReinoVegetal(float valor, Gusto gusto)
 {
     this.valor = valor;
     this.gusto = gusto;
 }
예제 #5
0
 public ReinoVegetal(Gusto gusto) : this(calcularValor.Next(1, 100), gusto)
 {
 }
예제 #6
0
 public Carnibora(float valor, Gusto gusto, Captura tipo, int tamanio) : this(valor, gusto, tipo)
 {
     // Completar
     this.tamanio = tamanio;
 }
예제 #7
0
 public Carnibora(float valor, Gusto gusto, Captura tipo) : base(valor, gusto)
 {
     // Completar
     this.tipo = tipo; //falta tamaño
 }
예제 #8
0
 public Verdura(float valor, Gusto gusto, TipoVerdura tipo)
     : base(valor, gusto)
 {
     this.tipo = tipo;
 }
예제 #9
0
 public Carnibora(float valor, Gusto gusto, Captura tipo)
     : base(valor, gusto)
 {
     this.tipo = tipo;
 }
예제 #10
0
 public ReinoVegetal(Gusto gusto)
 {
     this.valor = calcularValor.Next(1, 100);
 }
예제 #11
0
 public ReinoVegetal(float valor, Gusto gusto) : this(gusto)
 {
     this.valor = valor;
 }
예제 #12
0
 public ReinoVegetal(Gusto gusto)
 {
     //this.valor = calcularValor.Next(1, 100);
     this.gusto = gusto;
 }