Example #1
0
        private static Tuple <int, int> Pick(string filename)
        {
            Tuple <int, int> x = new Tuple <int, int>(0, 0);

            string[] file = Opener.CutStringLevel(filename);
            for (int i = 0; i < file.Length - 1; i++)
            {
                for (int j = 0; j < file[i].Length; j++)
                {
                    {
                        if (file[i][j] ==
                            CustomerInfo.SplitCustomerInfo(filename)[3].ToCharArray()[0])
                        {
                            x = new Tuple <int, int>(j, i);
                        }
                    }
                }
            }

            return(x);
        }
Example #2
0
        public CustomerEntity(string filename)
        {
            this.filename     = filename;
            customerInfo      = CustomerInfo.SplitCustomerInfo(this.filename);
            this.customerName = customerInfo[1];
            counter           = customerInfo[2];
            platform          = customerInfo[3];
            destination       = customerInfo[4];
            timelimit         = customerInfo[5];
            points            = customerInfo[6];
            countTime         = new TimedEvent(TimeSpanType.Seconds, Int32.Parse(counter),
                                               "", "", "");
            timeToDrop = new TimedEvent(TimeSpanType.Seconds, Int32.Parse(timelimit),
                                        "", "", "");
            Entity = new Entity(new DynamicShape(new Vec2F(
                                                     CustomerInfo.PickupPosition(this.filename).Item1,
                                                     CustomerInfo.PickupPosition(this.filename).Item2),
                                                 new Vec2F(0.06f, 0.06f)),
                                new Image(Path.Combine("Assets", "Images", "CustomerStandRight.png")));
            Entity.Shape.AsDynamicShape().Direction = new Vec2F(0, 0);

            countTime.ResetTimer();
            timeToDrop.ResetTimer();
        }