Beispiel #1
0
        public void CreateRandomWaypoints()
        {
            var terrain = TerrainMgr.GetTerrain(MapId);

            if (terrain != null)
            {
                var gen = new RandomWaypointGenerator();
                var wps = gen.GenerateWaypoints(terrain, Position, RespawnRadius);
                AddWaypoints(wps);
                Waypoints.Last.Value.WaitTime = (uint)Utility.Random(2000, 7000);
            }
        }
Beispiel #2
0
            public override void Process(CmdTrigger <ToolCmdArgs> trigger)
            {
                var text    = trigger.Text;
                var min     = text.NextInt(3);
                var max     = text.NextInt(5);
                var minDist = text.NextFloat(5);
                var maxDist = text.NextFloat(10);

                var gen = new RandomWaypointGenerator();
                var wps = gen.GenerateWaypoints(new EmptyTerrain(), Vector3.Zero, min, max, minDist, maxDist);

                trigger.Reply(wps.ToString("\n"));
            }