Exemplo n.º 1
0
 private Product SetupProduct()
 {
     ConsoleApplication2.Shop.Product product = new Cold();
     product.Id    = 1;
     product.Name  = "Glace";
     product.Price = new Decimal(10);
     return(product);
 }
Exemplo n.º 2
0
        static IDiscreteDistribution <Sneezed> SneezedGivenCold(Cold c)
        {
            var list = new List <Sneezed>()
            {
                Sneezed.No, Sneezed.Yes
            };

            return(c == Cold.No ?
                   list.ToWeighted(97, 3) :
                   list.ToWeighted(15, 85));
        }
    protected override void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag != UnAffectedTag)
        {
            FindObjectOfType <AudioManager>().Play("IceExplosion");

            if (other.tag == opponent)
            {
                GameObject gameObject = Instantiate(coldPrefab, transform.position, Quaternion.identity);
                Cold       cold       = gameObject.GetComponent <Cold>();
                cold.SlowEnemy(other.gameObject.GetComponent <EnemyMovement>(), other.gameObject.GetComponentInChildren <Billboard>().transform);
            }
            base.OnTriggerEnter(other);
        }
    }
Exemplo n.º 4
0
        private List <Product> SetupProductList()
        {
            List <Product> result = new List <Product>();

            #region Products creation
            Product product1 = new Cold();
            product1.Id    = 1;
            product1.Name  = "product 1";
            product1.Price = new Decimal(10);
            result.Add(product1);

            Product product2 = new Consistant();
            product2.Id    = 2;
            product2.Name  = "product 2";
            product2.Price = new Decimal(20);
            result.Add(product2);

            Product product3 = new Fluid();
            product3.Id    = 3;
            product3.Name  = "product 3";
            product3.Price = new Decimal(30);
            result.Add(product3);

            Product product4 = new Hot();
            product4.Id    = 4;
            product4.Name  = "product 4";
            product4.Price = new Decimal(40);
            result.Add(product4);

            Product product5 = new Usefull();
            product5.Id    = 5;
            product5.Name  = "product 5";
            product5.Price = new Decimal(50);
            result.Add(product5);

            Product product6 = new Useless();
            product6.Id    = 6;
            product6.Name  = "product 6";
            product6.Price = new Decimal(60);
            result.Add(product6);

            Product product7 = new Usable();
            product7.Id    = 7;
            product7.Name  = "product 7";
            product7.Price = new Decimal(70);
            result.Add(product7);

            Product product8 = new Cold();
            product8.Id    = 8;
            product8.Name  = "product 8";
            product8.Price = new Decimal(80);
            result.Add(product8);

            Product product9 = new Cold();
            product9.Id    = 9;
            product9.Name  = "product 9";
            product9.Price = new Decimal(90);
            result.Add(product9);

            Product product10 = new Cold();
            product10.Id    = 10;
            product10.Name  = "product 10";
            product10.Price = new Decimal(100);
            result.Add(product10);
            #endregion

            return(result);
        }
Exemplo n.º 5
0
 public void BuildCold(Cold cl) => drink.Cold                = cl;