Esempio n. 1
0
        public static Order generateNewOrder(int level)
        {
            int seed = (int)DateTime.Now.Ticks;
              Random random = new Random(seed);
              // Random random = Game1.random;
              Order order = new Order(level);
              int total = level;

              // Order is important
              total = setResourceValue(random, ref order.CostMetal, total);
              total = setResourceValue(random, ref order.CostChip, total);
              total = setResourceValue(random, ref order.CostBio, total);
              total = setResourceValue(random, ref order.CostResearch, total);
              total = setResourceValue(random, ref order.CostCosmic, total);

              // Set Monetary Value
              order.Value = random.Next(level * 25, level * 50);

              return order;
        }
 public OrderEventArg(Order order)
     : base()
 {
     this.order = order;
 }
Esempio n. 3
0
 public void receiveOrder(Order order)
 {
     waiting = false;
       this.order = order;
 }
 public void giveOrder(object sender, Order order)
 {
     if (onGiveOrder != null)
     onGiveOrder(sender, new OrderEventArg(order));
 }