Beispiel #1
0
        private object DoPlace(PlaceOptions options, RootComponent scene)
        {
            if (_robot == null)
            {
                _robot = new RobotEntity();
                _robot.AttachTo(scene);
            }

            _robot.Place(new Vector(options.PosX, options.PosY, 0f), options.Facing);

            Console.WriteLine($"Robot is at {_robot.GetPosition().X}, {_robot.GetPosition().Y} " +
                              $"facing {Orientation.FromVector(_robot.GetOrientation()).CardinalDirection}");

            return(null);
        }