Пример #1
0
        public Ikea(Vector2 position, Texture2D truck_texture, Texture2D ikea, Texture2D product_box, Texture2D ore_container)
        {
            processes = new List<IStateMachine>();
            ProductsToShip = new List<IContainer>();
            this.ikea = ikea;
            this.truckTexture = truck_texture;
            this.oreContainer = ore_container;
            this.product_box = product_box;
            this.position = position;

            ITruck newTruck = new Truck (new Vector2(position.X -150, position.Y + 15), new Vector2(-50, 0), truckTexture);
            this.waitingTruck = newTruck;

            processes.Add(
                new Repeat(new Seq(new Timer(1.0f),
                    new Call(new AddOreBoxToMine(this)))));
        }
Пример #2
0
        public ITruck GetReadyTruck()
        {
            IContainer _container = new Container (100, 200, new Vector2(position.X - 80, position.Y + 15), oreContainer);
            ITruck readyTruck = this.waitingTruck;
            waitingTruck.AddContainer (_container);

            ITruck newTruck = new Truck (new Vector2(position.X -150, position.Y + 15), new Vector2(-50, 0), truckTexture);
            waitingTruck = newTruck;

            return readyTruck;
        }
Пример #3
0
 public ITruck GetReadyTruck()
 {
     Truck sample_truck = new Truck(truck, position);
     return sample_truck;
 }