//Universum Beitreten
        public void Enter(string universeGroupName, string teamName)
        {
            universeGroup = connector.UniverseGroups[universeGroupName];
            Team team = universeGroup.Teams[teamName];

            //Um einem team zu betreten


            // if (!File.Exists("benchmark123.bin"))
            // {
            //     PerformanceMark newBenchmark = Connector.DoBenchmark();
            //     File.WriteAllBytes("benchmark123.bin", Connector.SaveBenchmark());
            // }
            // else
            // {
            //     Connector.LoadBenchmark(File.ReadAllBytes("benchmark.bin"));
            // }


            universeGroup.Join("Karim", team);

            ship = universeGroup.RegisterShip("Flixbus", "Flixbus");

            Thread thread = new Thread(Run);

            thread.Name = "MainLoop";
            thread.Start();
        }
Beispiel #2
0
        public void Enter(string universeGroupName, string teamName = "None")
        {
            _universeGroup = _connector.UniverseGroups[universeGroupName];
            Team team = _universeGroup.Teams[teamName];

            _universeGroup.Join(Nickname, team);

            _ship = _universeGroup.RegisterShip(ShipType, ShipName);

            Thread thread = new Thread(Run)
            {
                Name = "MainLoop"
            };

            thread.Start();
        }
Beispiel #3
0
        public Starship(Starbase starBase, UniverseGroup universeGroup)
        {
            this.universeGroup = universeGroup;
            this.starBase      = starBase;

            Random r = new Random();

            Name = "Scharle" + r.Next(1000, 2000).ToString();

            ship = universeGroup.RegisterShip("ScharleRover", Name);

            Thread thread = new Thread(shipRotation);

            thread.Name = "StarShip";
            thread.Start();

            scanRange = ship.ScannerArea.Limit;
            scanAngle = ship.ScannerDegreePerScan;

            shotStartDistance = ship.WeaponSize + ship.Radius - 10;

            shotSpeed = ship.WeaponShot.Speed.Limit;
            shotTime  = ship.WeaponShot.Time.Limit;
        }