예제 #1
0
        public void Load()
        {
            SMenu.AddSubMenu(GetMenu());

            var autos = new AutoEvents();

            AntiGapcloser.OnEnemyGapcloser     += autos.AntiGapClose;
            Interrupter2.OnInterruptableTarget += autos.AutoInterrupter;
            Game.OnUpdate += autos.OnUpdate;
        }
예제 #2
0
        public override void Dispose()
        {
            if (Overseer != null)
            {
                Overseer.Dispose();

                AutoEvents.Dispose();
                AutoOryx.Dispose();
            }

            base.Dispose();
        }
예제 #3
0
        public RacingCar()
        {
            this.cars = new List <Car> ();
            Random r = new Random();

            for (int i = 0; i < 5; i++)
            {
                Car c;
                switch (r.Next(1, 4))
                {
                case 1: { c = new SportCar(); break; }

                case 2: { c = new LightCar();  break; }

                case 3: { c = new BigCar(); break; }

                case 4: { c = new BusCar(); break; }

                default: { c = new LightCar(); break; }
                }
                this.cars.Add(c);
                if (i == 0)
                {
                    start      = new Start(c.Start);
                    plusSpeed  = new PlusSpeed(c.PlusSpeed);
                    minusSpeed = new MinusSpeed(c.MinusSpeed);
                    events     = new AutoEvents(c.InRoad);
                }
                else
                {
                    start      += c.Start;
                    plusSpeed  += c.PlusSpeed;
                    minusSpeed += c.MinusSpeed;
                    events     += c.InRoad;
                }
            }
        }