Example #1
0
        GKObstacle AddObstacle(CGPoint point)
        {
            var circleShape = SKShapeNode.FromCircle(DefaultAgentRadius);

            circleShape.LineWidth   = 2.5f;
            circleShape.FillColor   = SKColor.Gray;
            circleShape.StrokeColor = SKColor.Red;
            circleShape.ZPosition   = 1;
            circleShape.Position    = point;
            AddChild(circleShape);

            var obstacle = new GKCircleObstacle(DefaultAgentRadius);

            obstacle.Position = new Vector2((float)point.X, (float)point.Y);

            return(obstacle);
        }
Example #2
0
        GKObstacle AddObstacle(CGPoint point)
        {
            var circleShape = SKShapeNode.FromCircle (DefaultAgentRadius);
            circleShape.LineWidth = 2.5f;
            circleShape.FillColor = SKColor.Gray;
            circleShape.StrokeColor = SKColor.Red;
            circleShape.ZPosition = 1;
            circleShape.Position = point;
            AddChild (circleShape);

            var obstacle = new GKCircleObstacle (DefaultAgentRadius);
            obstacle.Position = new Vector2((float)point.X, (float)point.Y);

            return obstacle;
        }